summaryrefslogtreecommitdiffstats
path: root/components/pm-subscription-handler/tests/base_setup.py
diff options
context:
space:
mode:
authorshivasubedi <shiva.subedi@est.tech>2021-01-18 13:59:18 +0000
committershivasubedi <shiva.subedi@est.tech>2021-02-09 10:57:23 +0000
commit9aa0b665b1d8ad6105ea783e176eacc58b26a804 (patch)
tree2cbb03f5a23a465062f4d3a1940018de3a2f7585 /components/pm-subscription-handler/tests/base_setup.py
parentf7be006e7cc638788164fb1028d03898138b8c16 (diff)
[PMSH] Validate schema of PMSH monitoring policy
Change-Id: I42b002f855a03b39ab85cfcb20d7857d30447e40 Signed-off-by: shivasubedi <shiva.subedi@est.tech> Issue-ID: DCAEGEN2-2152
Diffstat (limited to 'components/pm-subscription-handler/tests/base_setup.py')
-rwxr-xr-xcomponents/pm-subscription-handler/tests/base_setup.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/components/pm-subscription-handler/tests/base_setup.py b/components/pm-subscription-handler/tests/base_setup.py
index 2e50dde9..9e12f96e 100755
--- a/components/pm-subscription-handler/tests/base_setup.py
+++ b/components/pm-subscription-handler/tests/base_setup.py
@@ -21,11 +21,12 @@ from unittest import TestCase
from unittest.mock import patch, MagicMock
from mod import create_app, db
+from mod.network_function import NetworkFunctionFilter
from mod.pmsh_utils import AppConfig
-def get_pmsh_config():
- with open(os.path.join(os.path.dirname(__file__), 'data/cbs_data_1.json'), 'r') as data:
+def get_pmsh_config(file_path='data/cbs_data_1.json'):
+ with open(os.path.join(os.path.dirname(__file__), file_path), 'r') as data:
return json.load(data)
@@ -48,6 +49,7 @@ class BaseClassSetup(TestCase):
os.environ['AAI_SERVICE_PORT'] = '8443'
db.create_all()
self.app_conf = AppConfig()
+ self.app_conf.nf_filter = NetworkFunctionFilter(**self.app_conf.subscription.nfFilter)
def tearDown(self):
db.drop_all()