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_aai_service.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_aai_service.py')
-rw-r--r-- | components/pm-subscription-handler/tests/test_aai_service.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/components/pm-subscription-handler/tests/test_aai_service.py b/components/pm-subscription-handler/tests/test_aai_service.py index 1ee71554..9a3a1b69 100644 --- a/components/pm-subscription-handler/tests/test_aai_service.py +++ b/components/pm-subscription-handler/tests/test_aai_service.py @@ -25,18 +25,24 @@ import responses from requests import Session import mod.aai_client as aai_client +from mod import create_app class AaiClientTestCase(TestCase): - def setUp(self): + @patch('mod.update_config') + @patch('mod.get_db_connection_url') + def setUp(self, mock_get_db_url, mock_update_config): + mock_get_db_url.return_value = 'sqlite://' self.env = EnvironmentVarGuard() self.env.set('AAI_SERVICE_HOST', '1.2.3.4') self.env.set('AAI_SERVICE_PORT', '8443') + 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 = json.load(data) with open(os.path.join(os.path.dirname(__file__), 'data/aai_xnfs.json'), 'r') as data: self.aai_response_data = data.read() + self.app = create_app() @patch.object(Session, 'put') def test_aai_client_get_pm_sub_data_success(self, mock_session): |