Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15-SP2:Update
salt.21002
fix-zypper-pkg.list_pkgs-expectation-and-dpkg-m...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File fix-zypper-pkg.list_pkgs-expectation-and-dpkg-mockin.patch of Package salt.21002
From 81f38c8cb16634b2c86b3e1e7c745870f90771d0 Mon Sep 17 00:00:00 2001 From: Mihai Dinca <mdinca@suse.de> Date: Thu, 13 Jun 2019 17:48:55 +0200 Subject: [PATCH] Fix zypper pkg.list_pkgs expectation and dpkg mocking --- tests/unit/modules/test_dpkg_lowpkg.py | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/tests/unit/modules/test_dpkg_lowpkg.py b/tests/unit/modules/test_dpkg_lowpkg.py index 160bbcd5b1..dadbc30dfa 100644 --- a/tests/unit/modules/test_dpkg_lowpkg.py +++ b/tests/unit/modules/test_dpkg_lowpkg.py @@ -308,9 +308,14 @@ class DpkgTestCase(TestCase, LoaderModuleMockMixin): dpkg.bin_pkg_info("package.deb")["name"], "package_name" ) - @patch("salt.modules.dpkg._get_pkg_ds_avail", MagicMock(return_value=dselect_pkg)) - @patch("salt.modules.dpkg._get_pkg_info", MagicMock(return_value=pkgs_info)) - @patch("salt.modules.dpkg._get_pkg_license", MagicMock(return_value="BSD v3")) + @patch( + "salt.modules.dpkg_lowpkg._get_pkg_ds_avail", + MagicMock(return_value=dselect_pkg), + ) + @patch("salt.modules.dpkg_lowpkg._get_pkg_info", MagicMock(return_value=pkgs_info)) + @patch( + "salt.modules.dpkg_lowpkg._get_pkg_license", MagicMock(return_value="BSD v3") + ) def test_info(self): """ Test info @@ -359,9 +364,14 @@ class DpkgTestCase(TestCase, LoaderModuleMockMixin): ) assert pkg_data["license"] == "BSD v3" - @patch("salt.modules.dpkg._get_pkg_ds_avail", MagicMock(return_value=dselect_pkg)) - @patch("salt.modules.dpkg._get_pkg_info", MagicMock(return_value=pkgs_info)) - @patch("salt.modules.dpkg._get_pkg_license", MagicMock(return_value="BSD v3")) + @patch( + "salt.modules.dpkg_lowpkg._get_pkg_ds_avail", + MagicMock(return_value=dselect_pkg), + ) + @patch("salt.modules.dpkg_lowpkg._get_pkg_info", MagicMock(return_value=pkgs_info)) + @patch( + "salt.modules.dpkg_lowpkg._get_pkg_license", MagicMock(return_value="BSD v3") + ) def test_info_attr(self): """ Test info with 'attr' parameter -- 2.29.2
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor