summaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2013-09-09 16:00:43 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2013-09-09 16:00:43 -0400
commitece78e71a84c19da694d0122be2e6d78d08d8e8d (patch)
tree3008718e6ad81dee51dc04d501670ee247c2108f /testsuite
parent6b662945b58eafd8e27f0191f4d7a78e7cc4ad05 (diff)
parent8fd0dad3e99f4452a6cd3f27e5c97efd9fc308e7 (diff)
downloadbcfg2-ece78e71a84c19da694d0122be2e6d78d08d8e8d.tar.gz
bcfg2-ece78e71a84c19da694d0122be2e6d78d08d8e8d.tar.bz2
bcfg2-ece78e71a84c19da694d0122be2e6d78d08d8e8d.zip
Merge branch 'maint'
Conflicts: src/lib/Bcfg2/Server/Plugins/Cfg/CfgAuthorizedKeysGenerator.py src/lib/Bcfg2/Server/Plugins/Cfg/__init__.py testsuite/Testsrc/Testlib/TestClient/TestTools/TestPOSIXUsers.py
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/Testsrc/Testlib/TestClient/TestTools/TestPOSIXUsers.py1
-rw-r--r--testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestCfg/Test_init.py12
2 files changed, 8 insertions, 5 deletions
diff --git a/testsuite/Testsrc/Testlib/TestClient/TestTools/TestPOSIXUsers.py b/testsuite/Testsrc/Testlib/TestClient/TestTools/TestPOSIXUsers.py
index d9d8a26c6..9647413b6 100644
--- a/testsuite/Testsrc/Testlib/TestClient/TestTools/TestPOSIXUsers.py
+++ b/testsuite/Testsrc/Testlib/TestClient/TestTools/TestPOSIXUsers.py
@@ -30,6 +30,7 @@ class TestPOSIXUsers(TestTool):
set_setup_default('uid_blacklist')
set_setup_default('gid_whitelist')
set_setup_default('gid_blacklist')
+ set_setup_default('encoding', 'UTF-8')
def get_obj(self, config=None):
return TestTool.get_obj(self, config)
diff --git a/testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestCfg/Test_init.py b/testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestCfg/Test_init.py
index 307461918..1b55beded 100644
--- a/testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestCfg/Test_init.py
+++ b/testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestCfg/Test_init.py
@@ -612,7 +612,7 @@ class TestCfgEntrySet(TestEntrySet):
def reset():
for e in eset.entries.values():
- if e.specific is not None:
+ if hasattr(e.specific, "reset_mock"):
e.specific.reset_mock()
metadata = Mock()
@@ -629,7 +629,7 @@ class TestCfgEntrySet(TestEntrySet):
[eset.entries['test1.txt'],
eset.entries['test3.txt']])
for entry in eset.entries.values():
- if entry.specific is not None:
+ if hasattr(entry.specific.matches, "called"):
self.assertFalse(entry.specific.matches.called)
reset()
@@ -637,20 +637,22 @@ class TestCfgEntrySet(TestEntrySet):
[eset.entries['test6.txt']])
eset.entries['test6.txt'].specific.matches.assert_called_with(metadata)
for ename, entry in eset.entries.items():
- if ename != 'test6.txt' and entry.specific is not None:
+ if (ename != 'test6.txt' and
+ hasattr(entry.specific.matches, "called")):
self.assertFalse(entry.specific.matches.called)
reset()
self.assertItemsEqual(eset.get_handlers(metadata, CfgFilter), [])
eset.entries['test7.txt'].specific.matches.assert_called_with(metadata)
for ename, entry in eset.entries.items():
- if ename != 'test7.txt' and entry.specific is not None:
+ if (ename != 'test7.txt' and
+ hasattr(entry.specific.matches, "called")):
self.assertFalse(entry.specific.matches.called)
reset()
self.assertItemsEqual(eset.get_handlers(metadata, Mock), [])
for ename, entry in eset.entries.items():
- if entry.specific is not None:
+ if hasattr(entry.specific.matches, "called"):
self.assertFalse(entry.specific.matches.called)
@patch("Bcfg2.Server.Plugins.Cfg.CfgDefaultInfo")