diff options
Diffstat (limited to 'components/pm-subscription-handler/tests/base_setup.py')
-rwxr-xr-x | components/pm-subscription-handler/tests/base_setup.py | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/components/pm-subscription-handler/tests/base_setup.py b/components/pm-subscription-handler/tests/base_setup.py index 0005be74..560eaeb8 100755 --- a/components/pm-subscription-handler/tests/base_setup.py +++ b/components/pm-subscription-handler/tests/base_setup.py @@ -23,7 +23,7 @@ from unittest.mock import patch, MagicMock from mod import create_app, db from mod.api.db_models import NetworkFunctionFilterModel, MeasurementGroupModel, \ - SubscriptionModel, NfSubRelationalModel + SubscriptionModel, NetworkFunctionModel, NfSubRelationalModel from mod.network_function import NetworkFunctionFilter from mod.pmsh_utils import AppConfig from mod.pmsh_config import AppConfig as NewAppConfig @@ -89,6 +89,26 @@ def create_multiple_subscription_data(subscription_names): return subscriptions +def create_multiple_network_function_data(nf_name_list): + """ + Creates list of network function model objects + + Args: + nf_name_list (list): Network function names + + Returns + list: of network function model objects + """ + nf_list = [] + for nf_name in nf_name_list: + nf = NetworkFunctionModel(nf_name, '10.10.10.32', '2001:0db8:0:0:0:0:1428:57ab', + '687kj45-d396-4efb-af02-6b83499b12f8', + 'e80a6ae3-cafd-4d24-850d-e14c084a5ca9', + 'model_name', 'pm_control', '1.0.2') + nf_list.append(nf) + return nf_list + + class BaseClassSetup(TestCase): app = None app_context = None |