diff options
author | 2020-05-12 12:56:56 +0100 | |
---|---|---|
committer | 2020-06-05 10:11:06 +0100 | |
commit | 2760519436f78975f16f26c412e842e34b28d624 (patch) | |
tree | 3fb616398002bd4525c10ff8b510bbf5ebadc26f /components/pm-subscription-handler/tests/test_controller.py | |
parent | 5ed9b7d3cad56c6438bca305b6d2931bd320352b (diff) |
[PMSH] Replace own logging implementation with pylog
Signed-off-by: ERIMROB <robertas.rimkus@est.tech>
Issue-ID: DCAEGEN2-2155
Change-Id: I670c4fff8029a73075b651c2afe6237c08cf907c
Diffstat (limited to 'components/pm-subscription-handler/tests/test_controller.py')
-rwxr-xr-x | components/pm-subscription-handler/tests/test_controller.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/components/pm-subscription-handler/tests/test_controller.py b/components/pm-subscription-handler/tests/test_controller.py index 8ef39460..8ca208ae 100755 --- a/components/pm-subscription-handler/tests/test_controller.py +++ b/components/pm-subscription-handler/tests/test_controller.py @@ -29,9 +29,10 @@ from mod.network_function import NetworkFunction class ControllerTestCase(unittest.TestCase): + @patch('mod.update_config') @patch('mod.get_db_connection_url') @patch.object(Session, 'put') - def setUp(self, mock_session, mock_get_db_url): + def setUp(self, mock_session, mock_get_db_url, mock_update_config): mock_get_db_url.return_value = 'sqlite://' with open(os.path.join(os.path.dirname(__file__), 'data/aai_xnfs.json'), 'r') as data: self.aai_response_data = data.read() @@ -40,8 +41,7 @@ class ControllerTestCase(unittest.TestCase): self.env = EnvironmentVarGuard() self.env.set('AAI_SERVICE_HOST', '1.2.3.4') self.env.set('AAI_SERVICE_PORT', '8443') - self.env.set('TESTING', 'True') - self.env.set('LOGS_PATH', './unit_test_logs') + self.env.set('LOGGER_CONFIG', os.path.join(os.path.dirname(__file__), 'log_config.yaml')) with open(os.path.join(os.path.dirname(__file__), 'data/cbs_data_1.json'), 'r') as data: self.cbs_data_1 = json.load(data) self.sub_1, self.xnfs = aai_client.get_pmsh_subscription_data(self.cbs_data_1) |