summaryrefslogtreecommitdiffstats
path: root/testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestCfg/TestCfgPrivateKeyCreator.py
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2013-08-13 09:31:49 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2013-08-13 09:31:49 -0400
commitda0918e71e82c407e1dc7f5cb80f33cad93263af (patch)
treef91255bdd8019aee0ac60de69e42eee56335d180 /testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestCfg/TestCfgPrivateKeyCreator.py
parent5c5edfa9b3a2f3baad06802269e7acd1d3e77566 (diff)
downloadbcfg2-da0918e71e82c407e1dc7f5cb80f33cad93263af.tar.gz
bcfg2-da0918e71e82c407e1dc7f5cb80f33cad93263af.tar.bz2
bcfg2-da0918e71e82c407e1dc7f5cb80f33cad93263af.zip
testsuite: fixed unit tests for new SSLCA stuff
Diffstat (limited to 'testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestCfg/TestCfgPrivateKeyCreator.py')
-rw-r--r--testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestCfg/TestCfgPrivateKeyCreator.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestCfg/TestCfgPrivateKeyCreator.py b/testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestCfg/TestCfgPrivateKeyCreator.py
index ea0853a8d..2967a23b6 100644
--- a/testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestCfg/TestCfgPrivateKeyCreator.py
+++ b/testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestCfg/TestCfgPrivateKeyCreator.py
@@ -22,16 +22,15 @@ while path != "/":
break
path = os.path.dirname(path)
from common import *
-from TestServer.TestPlugins.TestCfg.Test_init import TestCfgCreator
-from TestServer.TestPlugin.Testhelpers import TestStructFile
+from TestServer.TestPlugins.TestCfg.Test_init import TestXMLCfgCreator
-class TestCfgPrivateKeyCreator(TestCfgCreator, TestStructFile):
+class TestCfgPrivateKeyCreator(TestXMLCfgCreator):
test_obj = CfgPrivateKeyCreator
should_monitor = False
def get_obj(self, name=None, fam=None):
- return TestCfgCreator.get_obj(self, name=name)
+ return TestXMLCfgCreator.get_obj(self, name=name)
@patch("shutil.rmtree")
@patch("tempfile.mkdtemp")
@@ -93,7 +92,7 @@ class TestCfgPrivateKeyCreator(TestCfgCreator, TestStructFile):
# the get_specificity() return value is being used
# appropriately, we put some dummy data in it and test for
# that data
- pkc.get_specificity.side_effect = lambda m, s: dict(group="foo")
+ pkc.get_specificity.side_effect = lambda m: dict(group="foo")
pkc._gen_keypair = Mock()
privkey = os.path.join(datastore, "privkey")
pkc._gen_keypair.return_value = privkey
@@ -137,8 +136,7 @@ class TestCfgPrivateKeyCreator(TestCfgCreator, TestStructFile):
("ssh-rsa publickey pubkey.filename\n",
"privatekey"))
pkc.XMLMatch.assert_called_with(metadata)
- pkc.get_specificity.assert_called_with(metadata,
- pkc.XMLMatch.return_value)
+ pkc.get_specificity.assert_called_with(metadata)
pkc._gen_keypair.assert_called_with(metadata,
pkc.XMLMatch.return_value)
self.assertItemsEqual(mock_open.call_args_list,