From e7f6914ca5397987eddc6788a6e378c51b12ce52 Mon Sep 17 00:00:00 2001 From: emartin Date: Mon, 24 Feb 2020 14:13:03 +0000 Subject: Handle AAI Update and Delete events for PMSH Change-Id: I7f84e4429011bbaea4de23077ce23629b897fd7d Issue-ID: DCAEGEN2-1846 Signed-off-by: emartin --- .../pm-subscription-handler/tests/test_subscription.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'components/pm-subscription-handler/tests/test_subscription.py') diff --git a/components/pm-subscription-handler/tests/test_subscription.py b/components/pm-subscription-handler/tests/test_subscription.py index 8fe233e4..c357ad79 100755 --- a/components/pm-subscription-handler/tests/test_subscription.py +++ b/components/pm-subscription-handler/tests/test_subscription.py @@ -134,13 +134,16 @@ class SubscriptionTest(TestCase): self.assertEqual('new_status', sub.status) def test_delete_subscription(self): - self.sub_1.create() - subs = self.sub_1.get_all() - self.assertEqual(1, len(subs)) + self.sub_1.add_network_functions_to_subscription([self.nf_1, self.nf_2]) + self.sub_2.add_network_functions_to_subscription([self.nf_2]) self.sub_1.delete_subscription() - new_subs = self.sub_1.get_all() - self.assertEqual(0, len(new_subs)) + + self.assertEqual(1, len(Subscription.get_all())) + self.assertEqual(None, Subscription.get(self.sub_1.subscriptionName)) + self.assertEqual(1, len(Subscription.get_all_nfs_subscription_relations())) + self.assertEqual(1, len(NetworkFunction.get_all())) + self.assertEqual(None, NetworkFunction.get(nf_name=self.nf_1.nf_name)) def test_update_sub_nf_status(self): sub_name = 'ExtraPM-All-gNB-R2B' -- cgit 1.2.3-korg