summaryrefslogtreecommitdiffstats
path: root/components/pm-subscription-handler/tests
diff options
context:
space:
mode:
authoremartin <ephraim.martin@est.tech>2020-03-27 16:31:48 +0000
committeremartin <ephraim.martin@est.tech>2020-03-27 16:46:55 +0000
commit01dfa52c169aa902e2cd8f58b65daaaf3af5e8e8 (patch)
treec4bb0a8146026cee8d0f14695e047b314935ba84 /components/pm-subscription-handler/tests
parent551cc5be912bb377931d3e38d41af11d53bf0e63 (diff)
Fix bug where PMSH pushes config to non-active pnf
Issue-ID: DCAEGEN2-2173 Signed-off-by: emartin <ephraim.martin@est.tech> Change-Id: Ib93a71e825f621721b5acda059cadcb7824f997d
Diffstat (limited to 'components/pm-subscription-handler/tests')
-rwxr-xr-xcomponents/pm-subscription-handler/tests/test_aai_event_handler.py4
-rwxr-xr-xcomponents/pm-subscription-handler/tests/test_subscription.py7
2 files changed, 6 insertions, 5 deletions
diff --git a/components/pm-subscription-handler/tests/test_aai_event_handler.py b/components/pm-subscription-handler/tests/test_aai_event_handler.py
index 0fd9e77e..f57df4cd 100755
--- a/components/pm-subscription-handler/tests/test_aai_event_handler.py
+++ b/components/pm-subscription-handler/tests/test_aai_event_handler.py
@@ -20,8 +20,8 @@ from os import path
from unittest import TestCase
from unittest.mock import patch, Mock
-from mod.aai_event_handler import OrchestrationStatus, process_aai_events
-from mod.network_function import NetworkFunction
+from mod.aai_event_handler import process_aai_events
+from mod.network_function import NetworkFunction, OrchestrationStatus
class AAIEventHandlerTest(TestCase):
diff --git a/components/pm-subscription-handler/tests/test_subscription.py b/components/pm-subscription-handler/tests/test_subscription.py
index d152863d..c95e2ab0 100755
--- a/components/pm-subscription-handler/tests/test_subscription.py
+++ b/components/pm-subscription-handler/tests/test_subscription.py
@@ -26,7 +26,7 @@ from tenacity import stop_after_attempt
import mod.aai_client as aai_client
from mod import db, create_app
-from mod.network_function import NetworkFunction, NetworkFunctionFilter
+from mod.network_function import NetworkFunction, NetworkFunctionFilter, OrchestrationStatus
from mod.pmsh_utils import AppConfig
from mod.subscription import Subscription
@@ -72,10 +72,11 @@ class SubscriptionTest(TestCase):
self.app_context.pop()
def test_xnf_filter_true(self):
- self.assertTrue(self.xnf_filter.is_nf_in_filter('pnf1'))
+ self.assertTrue(self.xnf_filter.is_nf_in_filter('pnf1', OrchestrationStatus.ACTIVE.value))
def test_xnf_filter_false(self):
- self.assertFalse(self.xnf_filter.is_nf_in_filter('PNF-33'))
+ self.assertFalse(self.xnf_filter.is_nf_in_filter('PNF-33',
+ OrchestrationStatus.ACTIVE.value))
def test_sub_measurement_group(self):
self.assertEqual(len(self.sub_1.measurementGroups), 2)