From b72ea385c43f58120903da014aad65c1f25851f3 Mon Sep 17 00:00:00 2001 From: BjornMagnussonXA Date: Sun, 20 Sep 2020 15:52:02 +0200 Subject: [PATCH] Minor correction of unit tests Change-Id: Iccad54bb3a88079dfe696b20d439f263bf60b09c Issue-ID: NONRTRIC-279 Signed-off-by: BjornMagnussonXA Change-Id: I4d587f48ffdb2cec50d2cca60c945a4551ce8434 --- near-rt-ric-simulator/tests/OSC_2.1.0/test_osc_2_1_0.py | 6 +++--- near-rt-ric-simulator/tests/STD_1.1.3/test_std_1_1_3.py | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/near-rt-ric-simulator/tests/OSC_2.1.0/test_osc_2_1_0.py b/near-rt-ric-simulator/tests/OSC_2.1.0/test_osc_2_1_0.py index 5b8be30..9b53a27 100644 --- a/near-rt-ric-simulator/tests/OSC_2.1.0/test_osc_2_1_0.py +++ b/near-rt-ric-simulator/tests/OSC_2.1.0/test_osc_2_1_0.py @@ -27,9 +27,9 @@ import json #Constants for the test case INTERFACE_VERSION="OSC_2.1.0" -PORT_NUMBER=2222 -HOST_IP="127.0.0.1" -SERVER_URL="http://127.0.0.1:"+str(PORT_NUMBER)+"/" +PORT_NUMBER="2222" +HOST_IP="localhost" +SERVER_URL="http://"+HOST_IP+":"+PORT_NUMBER+"/" cwd=os.getcwd()+"/" # Env TESTS_BASE_PATH is set when executed via tox.ini diff --git a/near-rt-ric-simulator/tests/STD_1.1.3/test_std_1_1_3.py b/near-rt-ric-simulator/tests/STD_1.1.3/test_std_1_1_3.py index 483d964..db0a6a2 100644 --- a/near-rt-ric-simulator/tests/STD_1.1.3/test_std_1_1_3.py +++ b/near-rt-ric-simulator/tests/STD_1.1.3/test_std_1_1_3.py @@ -26,9 +26,9 @@ import json #Constants for the test case INTERFACE_VERSION="STD_1.1.3" -PORT_NUMBER=2224 -HOST_IP="127.0.0.1" -SERVER_URL="http://127.0.0.1:"+str(PORT_NUMBER)+"/" +PORT_NUMBER="2224" +HOST_IP="localhost" +SERVER_URL="http://"+HOST_IP+":"+PORT_NUMBER+"/" cwd=os.getcwd()+"/" # Env TESTS_BASE_PATH is set when executed via tox.ini @@ -342,7 +342,7 @@ class TestCase1(TestCase): # API: Update policy instance pi2 # Reuse same policy data - response=requests.put(SERVER_URL+'A1-P/v1/policies/pi2?notificationDestination=http://localhost:2224/statustest', headers=header, data=json.dumps(data_pi2)) + response=requests.put(SERVER_URL+'A1-P/v1/policies/pi2?notificationDestination=http://'+HOST_IP+':'+PORT_NUMBER+'/statustest', headers=header, data=json.dumps(data_pi2)) self.assertEqual(response.status_code, 200) result=json.loads(response.text) res=compare(data_pi2, result) -- 2.16.6