summaryrefslogtreecommitdiffstats
path: root/components/pm-subscription-handler/tests/test_subscription.py
diff options
context:
space:
mode:
authorefiacor <fiachra.corcoran@est.tech>2020-12-11 16:19:47 +0000
committerefiacor <fiachra.corcoran@est.tech>2021-01-12 11:35:09 +0000
commit5e0e87f7e86f511511d37f90242300296e7b5dc4 (patch)
treed8ed3fc96a28cbdcd347565837e8a3fb6bcf2742 /components/pm-subscription-handler/tests/test_subscription.py
parent1e6f4d9c7ea75302f4b902dbbe13642b6d20d716 (diff)
[PMSH] Add retry mech for DELETE_FAILED NFs
Signed-off-by: efiacor <fiachra.corcoran@est.tech> Change-Id: I3980f0bb43c67e192828172dafe4e7be102dcc98 Issue-ID: DCAEGEN2-2152
Diffstat (limited to 'components/pm-subscription-handler/tests/test_subscription.py')
-rwxr-xr-xcomponents/pm-subscription-handler/tests/test_subscription.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/components/pm-subscription-handler/tests/test_subscription.py b/components/pm-subscription-handler/tests/test_subscription.py
index 62a9e16e..b18f41e8 100755
--- a/components/pm-subscription-handler/tests/test_subscription.py
+++ b/components/pm-subscription-handler/tests/test_subscription.py
@@ -113,8 +113,8 @@ class SubscriptionTest(BaseClassSetup):
@patch('mod.subscription.Subscription.add_network_function_to_subscription')
@patch('mod.subscription.Subscription.update_sub_nf_status')
def test_process_activate_subscription(self, mock_update_sub_nf, mock_add_nfs):
- self.app_conf.subscription.activate_subscription([list(self.xnfs)[0]], self.mock_mr_pub,
- self.app_conf)
+ self.app_conf.subscription.create_subscription_on_nfs([list(self.xnfs)[0]],
+ self.mock_mr_pub, self.app_conf)
mock_add_nfs.assert_called()
self.assertTrue(self.mock_mr_pub.publish_subscription_event_data.called)
@@ -126,13 +126,13 @@ class SubscriptionTest(BaseClassSetup):
def test_process_deactivate_subscription(self, mock_update_sub_nf, mock_get_nfs):
self.app_conf.subscription.administrativeState = 'LOCKED'
mock_get_nfs.return_value = [list(self.xnfs)[0]]
- self.app_conf.subscription.deactivate_subscription(self.mock_mr_pub, self.app_conf)
+ self.app_conf.subscription.delete_subscription_from_nfs(self.xnfs, self.mock_mr_pub,
+ self.app_conf)
self.assertTrue(self.mock_mr_pub.publish_subscription_event_data.called)
- mock_update_sub_nf.assert_called_with(self.app_conf.subscription.subscriptionName,
- 'PENDING_DELETE', list(self.xnfs)[0].nf_name)
+ self.assertEqual(mock_update_sub_nf.call_count, 3)
def test_activate_subscription_exception(self):
- self.assertRaises(Exception, self.app_conf.subscription.activate_subscription,
+ self.assertRaises(Exception, self.app_conf.subscription.create_subscription_on_nfs,
[list(self.xnfs)[0]], 'not_mr_pub', 'app_config')
def test_prepare_subscription_event(self):