Skip to content

Commit

Permalink
[fix] unittests
Browse files Browse the repository at this point in the history
  • Loading branch information
grindsa committed Apr 18, 2021
1 parent 4cababd commit 6322bf9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion est_proxy/est_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def _config_load(self):
try:
ca_handler_module = importlib.import_module('est_proxy.ca_handler')
except BaseException:
self.logger.error('ESTSrvHandler._config_load(): Loading default hander failed.')
self.logger.error('ESTSrvHandler._config_load(): Loading default handler failed.')
ca_handler_module = None
else:
if 'CAhandler' in config_dic:
Expand Down
6 changes: 3 additions & 3 deletions test/test_esthandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,8 +405,8 @@ def test_042_config_load(self, mock_load_cfg):
self.esthandler._config_load()
self.assertFalse(self.esthandler.cahandler)
self.assertEqual('openssl', self.esthandler.openssl_bin)
self.assertIn("ERROR:test_est:ESTSrvHandler._config_load(): CAhandler handler_file could not get loaded. Loading default hander...", lcm.output)
self.assertIn("ERROR:test_est:ESTSrvHandler._config_load(): Loading default hander failed.", lcm.output)
self.assertIn("ERROR:test_est:ESTSrvHandler._config_load(): CAhandler handler_file could not get loaded. with error: No module named 'handler_file'\nLoading default hander...", lcm.output)
self.assertIn("ERROR:test_est:ESTSrvHandler._config_load(): Loading default handler failed.", lcm.output)

@patch('importlib.import_module')
@patch('est_proxy.est_handler.config_load')
Expand All @@ -420,7 +420,7 @@ def test_043_config_load(self, mock_load_cfg, mock_import):
self.esthandler._config_load()
self.assertTrue(self.esthandler.cahandler)
self.assertEqual('openssl', self.esthandler.openssl_bin)
self.assertIn("ERROR:test_est:ESTSrvHandler._config_load(): CAhandler handler_file could not get loaded. Loading default hander...", lcm.output)
self.assertIn("ERROR:test_est:ESTSrvHandler._config_load(): CAhandler handler_file could not get loaded. with error: exc_cahandlerconfigload\nLoading default hander...", lcm.output)

@patch('importlib.import_module')
@patch('est_proxy.est_handler.config_load')
Expand Down

0 comments on commit 6322bf9

Please sign in to comment.