diff options
Diffstat (limited to 'components/pm-subscription-handler/tests')
-rwxr-xr-x | components/pm-subscription-handler/tests/base_setup.py | 3 | ||||
-rwxr-xr-x | components/pm-subscription-handler/tests/test_controller.py | 5 |
2 files changed, 6 insertions, 2 deletions
diff --git a/components/pm-subscription-handler/tests/base_setup.py b/components/pm-subscription-handler/tests/base_setup.py index 560eaeb8..14f813d4 100755 --- a/components/pm-subscription-handler/tests/base_setup.py +++ b/components/pm-subscription-handler/tests/base_setup.py @@ -1,5 +1,5 @@ # ============LICENSE_START=================================================== -# Copyright (C) 2020-2021 Nordix Foundation. +# Copyright (C) 2020-2022 Nordix Foundation. # ============================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -86,6 +86,7 @@ def create_multiple_subscription_data(subscription_names): subscriptions = [] for subscription_name in subscription_names: subscriptions.append(create_subscription_data(subscription_name)) + subscriptions[1].nfs = [] return subscriptions diff --git a/components/pm-subscription-handler/tests/test_controller.py b/components/pm-subscription-handler/tests/test_controller.py index 962e8fb2..fa96c319 100755 --- a/components/pm-subscription-handler/tests/test_controller.py +++ b/components/pm-subscription-handler/tests/test_controller.py @@ -1,5 +1,5 @@ # ============LICENSE_START=================================================== -# Copyright (C) 2019-2021 Nordix Foundation. +# Copyright (C) 2019-2022 Nordix Foundation. # ============================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -153,6 +153,9 @@ class ControllerTestCase(BaseClassSetup): self.assertEqual(subs[1]['subscription']['measurementGroups'][0]['measurementGroup'] ['measurementGroupName'], 'MG1') self.assertEqual(len(subs[1]['subscription']['measurementGroups']), 2) + self.assertEqual(subs[0]['subscription']['nfs'][0], 'pnf_101') + self.assertEqual(subs[0]['subscription']['nfs'][1], 'pnf_102') + self.assertEqual(subs[1]['subscription']['nfs'], []) self.assertEqual(len(subs), 2) @patch('mod.api.services.subscription_service.query_all_subscriptions', |