From c3edef5bd2b55266fee96327f17a093a0fb9cce4 Mon Sep 17 00:00:00 2001 From: "Chris St. Pierre" Date: Fri, 25 Apr 2014 09:10:05 -0400 Subject: testsuite: more unit test fixes --- .../TestServer/TestPlugins/TestCfg/TestCfgEncryptedGenerator.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestCfg/TestCfgEncryptedGenerator.py') diff --git a/testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestCfg/TestCfgEncryptedGenerator.py b/testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestCfg/TestCfgEncryptedGenerator.py index 2bfec0e2d..f07994d34 100644 --- a/testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestCfg/TestCfgEncryptedGenerator.py +++ b/testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestCfg/TestCfgEncryptedGenerator.py @@ -31,7 +31,9 @@ if can_skip or HAS_CRYPTO: "Bcfg2.Server.Plugins.Cfg.CfgEncryptedGenerator.get_algorithm") @patchIf(HAS_CRYPTO, "Bcfg2.Server.Plugins.Cfg.CfgEncryptedGenerator.bruteforce_decrypt") - def test_handle_event(self, mock_decrypt, mock_get_algorithm): + @patch("Bcfg2.Server.Plugins.Cfg.CfgEncryptedGenerator.SETUP") + def test_handle_event(self, mock_SETUP, mock_decrypt, + mock_get_algorithm): @patch("Bcfg2.Server.Plugins.Cfg.CfgGenerator.handle_event") def inner(mock_handle_event): def reset(): @@ -50,7 +52,7 @@ if can_skip or HAS_CRYPTO: mock_handle_event.assert_called_with(ceg, event) mock_decrypt.assert_called_with( "encrypted", - setup=Bcfg2.Server.Plugins.Cfg.SETUP, + setup=mock_SETUP, algorithm=mock_get_algorithm.return_value) self.assertEqual(ceg.data, "plaintext") -- cgit v1.2.3-1-g7c22