diff options
author | Hui Deng <denghui12@huawei.com> | 2020-07-31 01:44:20 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-07-31 01:44:20 +0000 |
commit | 824413f6f354330f868b38a2ec8cb93b3c8d2808 (patch) | |
tree | 24bcf3739c37a10284cde8aecb2060c5414cbdf1 /catalog/packages/tests/test_nsdm_subscription.py | |
parent | d4f87a40133722da489e4ae03825be544a7baca7 (diff) | |
parent | 246df561b466d1202a40ece1c133a4bf70ab958f (diff) |
Merge "Unity MSB address"
Diffstat (limited to 'catalog/packages/tests/test_nsdm_subscription.py')
-rw-r--r-- | catalog/packages/tests/test_nsdm_subscription.py | 35 |
1 files changed, 8 insertions, 27 deletions
diff --git a/catalog/packages/tests/test_nsdm_subscription.py b/catalog/packages/tests/test_nsdm_subscription.py index b992b2d..61c8ce6 100644 --- a/catalog/packages/tests/test_nsdm_subscription.py +++ b/catalog/packages/tests/test_nsdm_subscription.py @@ -29,7 +29,7 @@ from catalog.pub.config import config as pub_config import catalog.pub.utils.timeutil from catalog.packages.tests.const import nsd_data from catalog.pub.database.models import NSPackageModel, VnfPackageModel, PnfPackageModel -from catalog.pub.config.config import CATALOG_ROOT_PATH, MSB_SERVICE_IP, MSB_SERVICE_PORT +from catalog.pub.config.config import CATALOG_ROOT_PATH, MSB_BASE_URL from catalog.pub.utils import toscaparser @@ -180,8 +180,7 @@ class TestNsdmSubscription(TestCase): response = self.client.post("/api/nsd/v1/subscriptions", data=self.subscription, format='json') self.assertEqual(303, response.status_code) - redirect_addr = "https://%s:%s/%s" % (MSB_SERVICE_IP, MSB_SERVICE_PORT, - os.path.join(const.NSDM_SUBSCRIPTION_ROOT_URI, subscriptionid)) + redirect_addr = "%s/%s" % (MSB_BASE_URL, os.path.join(const.NSDM_SUBSCRIPTION_ROOT_URI, subscriptionid)) self.assertEqual(redirect_addr, response["Location"]) @mock.patch("requests.get") @@ -627,15 +626,9 @@ class TestNsdmSubscription(TestCase): 'nsdId': "b632bddc-bccd-4180-bd8d-4e8a9578eff7", '_links': { 'nsdInfo': { - 'href': 'http://%s:%s/%s/ns_descriptors/%s' % (pub_config.MSB_SERVICE_IP, - pub_config.MSB_SERVICE_PORT, - const.NSD_URL_PREFIX, - "d0ea5ec3-0b98-438a-9bea-488230cff174")}, + 'href': '%s/%s/ns_descriptors/%s' % (pub_config.MSB_BASE_URL, const.NSD_URL_PREFIX, "d0ea5ec3-0b98-438a-9bea-488230cff174")}, 'subscription': { - 'href': 'http://%s:%s/%s%s' % (pub_config.MSB_SERVICE_IP, - pub_config.MSB_SERVICE_PORT, - const.NSDM_SUBSCRIPTION_ROOT_URI, - "1111")} + 'href': '%s/%s%s' % (pub_config.MSB_BASE_URL, const.NSDM_SUBSCRIPTION_ROOT_URI, "1111")} }, "subscriptionId": "1111" @@ -682,16 +675,10 @@ class NotificationTest(TestCase): 'nsdId': "nsdid1", '_links': { 'nsdInfo': { - 'href': 'http://%s:%s/%s/ns_descriptors/%s' % (pub_config.MSB_SERVICE_IP, - pub_config.MSB_SERVICE_PORT, - const.NSD_URL_PREFIX, - "nsdinfoid1") + 'href': '%s/%s/ns_descriptors/%s' % (pub_config.MSB_BASE_URL, const.NSD_URL_PREFIX, "nsdinfoid1") }, 'subscription': { - 'href': 'http://%s:%s/%s%s' % (pub_config.MSB_SERVICE_IP, - pub_config.MSB_SERVICE_PORT, - const.NSDM_SUBSCRIPTION_ROOT_URI, - "1")} + 'href': '%s/%s%s' % (pub_config.MSB_BASE_URL, const.NSDM_SUBSCRIPTION_ROOT_URI, "1")} }, 'onboardingFailureDetails': "NSD(nsdid1) already exists.", "subscriptionId": "1" @@ -724,16 +711,10 @@ class NotificationTest(TestCase): 'pnfdId': "pnfdId1", '_links': { 'pnfdInfo': { - 'href': 'http://%s:%s/%s/pnf_descriptors/%s' % (pub_config.MSB_SERVICE_IP, - pub_config.MSB_SERVICE_PORT, - const.NSD_URL_PREFIX, - "pnfdInfoIds1") + 'href': '%s/%s/pnf_descriptors/%s' % (pub_config.MSB_BASE_URL, const.NSD_URL_PREFIX, "pnfdInfoIds1") }, 'subscription': { - 'href': 'http://%s:%s/%s%s' % (pub_config.MSB_SERVICE_IP, - pub_config.MSB_SERVICE_PORT, - const.NSDM_SUBSCRIPTION_ROOT_URI, - "1")}, + 'href': '%s/%s%s' % (pub_config.MSB_BASE_URL, const.NSDM_SUBSCRIPTION_ROOT_URI, "1")}, }, "subscriptionId": "1", } |