summaryrefslogtreecommitdiffstats
path: root/testsuite/Testsrc/Testlib/TestClient/TestTools/TestPOSIXUsers.py
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2013-02-21 08:47:59 -0500
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2013-02-21 08:47:59 -0500
commitacb1dde9ba48b04d1ceb701ce849e96cef3d0070 (patch)
tree4754d07af191cc08dfc2be55420403fdb887ad7a /testsuite/Testsrc/Testlib/TestClient/TestTools/TestPOSIXUsers.py
parentd8002c666c6a450e99c9fe476a5a3dcfb23f05db (diff)
downloadbcfg2-acb1dde9ba48b04d1ceb701ce849e96cef3d0070.tar.gz
bcfg2-acb1dde9ba48b04d1ceb701ce849e96cef3d0070.tar.bz2
bcfg2-acb1dde9ba48b04d1ceb701ce849e96cef3d0070.zip
removed in-place modification of "states" dict in client tools
Diffstat (limited to 'testsuite/Testsrc/Testlib/TestClient/TestTools/TestPOSIXUsers.py')
-rw-r--r--testsuite/Testsrc/Testlib/TestClient/TestTools/TestPOSIXUsers.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/testsuite/Testsrc/Testlib/TestClient/TestTools/TestPOSIXUsers.py b/testsuite/Testsrc/Testlib/TestClient/TestTools/TestPOSIXUsers.py
index 4fcd63a60..211c39732 100644
--- a/testsuite/Testsrc/Testlib/TestClient/TestTools/TestPOSIXUsers.py
+++ b/testsuite/Testsrc/Testlib/TestClient/TestTools/TestPOSIXUsers.py
@@ -24,11 +24,11 @@ from TestTools.Test_init import TestTool
class TestPOSIXUsers(TestTool):
test_obj = POSIXUsers
- def get_obj(self, logger=None, setup=None, config=None):
+ def get_obj(self, setup=None, config=None):
if setup is None:
setup = MagicMock()
setup.__getitem__.return_value = []
- return TestTool.get_obj(self, logger, setup, config)
+ return TestTool.get_obj(self, setup, config)
@patch("pwd.getpwall")
@patch("grp.getgrall")
@@ -134,10 +134,9 @@ class TestPOSIXUsers(TestTool):
users.set_defaults['POSIXUser'] = Mock()
users.set_defaults['POSIXUser'].side_effect = lambda e: e
- states = dict()
- self.assertEqual(users.Inventory(states),
+ self.assertEqual(users.Inventory(),
mock_Inventory.return_value)
- mock_Inventory.assert_called_with(users, states, config.getchildren())
+ mock_Inventory.assert_called_with(users, config.getchildren())
lxml.etree.SubElement(orig_bundle, "POSIXGroup", name="test")
self.assertXMLEqual(orig_bundle, bundle)
@@ -301,9 +300,8 @@ class TestPOSIXUsers(TestTool):
entries = [lxml.etree.Element("POSIXUser", name="test"),
lxml.etree.Element("POSIXGroup", name="test"),
lxml.etree.Element("POSIXUser", name="test2")]
- states = dict()
- users.Install(entries, states)
+ states = users.Install(entries)
self.assertItemsEqual(entries, states.keys())
for state in states.values():
self.assertEqual(state, users._install.return_value)