diff options
Diffstat (limited to 'components/pm-subscription-handler/tests/test_network_function.py')
-rwxr-xr-x | components/pm-subscription-handler/tests/test_network_function.py | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/components/pm-subscription-handler/tests/test_network_function.py b/components/pm-subscription-handler/tests/test_network_function.py index 3e38b9c6..d80f2c40 100755 --- a/components/pm-subscription-handler/tests/test_network_function.py +++ b/components/pm-subscription-handler/tests/test_network_function.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. @@ -17,7 +17,7 @@ # ============LICENSE_END===================================================== import json import os -from unittest.mock import patch, Mock +from unittest.mock import patch from mod.network_function import NetworkFunction from tests.base_setup import BaseClassSetup @@ -25,10 +25,6 @@ from tests.base_setup import BaseClassSetup class NetworkFunctionTests(BaseClassSetup): - @classmethod - def setUpClass(cls): - super().setUpClass() - def setUp(self): super().setUp() self.nf_1 = NetworkFunction(sdnc_model_name='blah', sdnc_model_version=1.0, @@ -49,13 +45,6 @@ class NetworkFunctionTests(BaseClassSetup): 'data/aai_model_info_no_sdnc.json'), 'r') as data: self.bad_model_info = json.loads(data.read()) - def tearDown(self): - super().tearDown() - - @classmethod - def tearDownClass(cls): - super().tearDownClass() - def test_get_network_function(self): self.nf_1.create() nf = NetworkFunction.get('pnf_1') @@ -82,7 +71,7 @@ class NetworkFunctionTests(BaseClassSetup): def test_delete_network_function(self): for nf in [self.nf_1, self.nf_2]: - self.app_conf.subscription.add_network_function_to_subscription(nf, Mock()) + nf.create() nfs = NetworkFunction.get_all() self.assertEqual(2, len(nfs)) NetworkFunction.delete(nf_name=self.nf_1.nf_name) |