diff options
author | 2022-03-02 17:59:27 +0000 | |
---|---|---|
committer | 2022-03-03 16:54:04 +0000 | |
commit | 5a2c43f2add2c6d4af8331a40b174684eac11b34 (patch) | |
tree | 4e76bac8e33d80b1e0e9af1fdf2b57fe6a9a7bf2 /components/pm-subscription-handler/tests/base_setup.py | |
parent | 5f69c24ad78121a2840b5299583791e557f8b535 (diff) |
[PMSH] Cleaning up old App Config, subscription handler and it's subsequent calls
Issue-ID: DCAEGEN2-3085
Signed-off-by: Raviteja, Karumuri <raviteja.karumuri@est.tech>
Change-Id: I7b862648eebf59844aaa9d09697b7f2a693c9d94
Diffstat (limited to 'components/pm-subscription-handler/tests/base_setup.py')
-rwxr-xr-x | components/pm-subscription-handler/tests/base_setup.py | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/components/pm-subscription-handler/tests/base_setup.py b/components/pm-subscription-handler/tests/base_setup.py index 14f813d4..90919ff1 100755 --- a/components/pm-subscription-handler/tests/base_setup.py +++ b/components/pm-subscription-handler/tests/base_setup.py @@ -24,9 +24,7 @@ from unittest.mock import patch, MagicMock from mod import create_app, db from mod.api.db_models import NetworkFunctionFilterModel, MeasurementGroupModel, \ SubscriptionModel, NetworkFunctionModel, NfSubRelationalModel -from mod.network_function import NetworkFunctionFilter -from mod.pmsh_utils import AppConfig -from mod.pmsh_config import AppConfig as NewAppConfig +from mod.pmsh_config import AppConfig def get_pmsh_config(file_path='data/cbs_data_1.json'): @@ -124,16 +122,11 @@ class BaseClassSetup(TestCase): cls.app_context = cls.app.app_context() cls.app_context.push() - @patch('mod.pmsh_utils.AppConfig._get_pmsh_config', MagicMock(return_value=get_pmsh_config())) + @patch('mod.pmsh_config.AppConfig._get_config', MagicMock(return_value=get_pmsh_config())) def setUp(self): os.environ['AAI_SERVICE_PORT'] = '8443' db.create_all() self.app_conf = AppConfig() - self.app_conf.nf_filter = NetworkFunctionFilter(**self.app_conf.subscription.nfFilter) - - @patch('mod.pmsh_config.AppConfig._get_config', MagicMock(return_value=get_pmsh_config())) - def setUpAppConf(self): - self.pmsh_app_conf = NewAppConfig() def tearDown(self): db.drop_all() |