Fix function test PCE 400G return code 10/95810/1
authorguillaume.lambert <guillaume.lambert@orange.com>
Tue, 20 Apr 2021 15:24:01 +0000 (17:24 +0200)
committerGuillaume Lambert <guillaume.lambert@orange.com>
Wed, 21 Apr 2021 12:30:25 +0000 (12:30 +0000)
The first test return code can shifted from 200 (OK) to 201 (created)
depending on the order that functional tests are run,
but also with or without lighty support.

JIRA: TRNSPRTPCE-442
Signed-off-by: guillaume.lambert <guillaume.lambert@orange.com>
Change-Id: I6bbc291acd0bc1a5f6bc3337fab8d7ebbe03400f
(cherry picked from commit 156b223e2ff116bea5834fc376090eac0ea1e75d)

tests/transportpce_tests/7.1/test_pce_400G.py

index 10fb918af0f1114a6ce437490763e8e2995f2804..3b19c7c15dd2c5db2ac4638269ccac5179b2bc38 100644 (file)
@@ -67,7 +67,7 @@ class TransportPCE400Gtesting(unittest.TestCase):
     # Load port mapping
     def test_01_load_port_mapping(self):
         response = test_utils.put_jsonrequest(test_utils.URL_FULL_PORTMAPPING, self.port_mapping_data)
     # Load port mapping
     def test_01_load_port_mapping(self):
         response = test_utils.put_jsonrequest(test_utils.URL_FULL_PORTMAPPING, self.port_mapping_data)
-        self.assertEqual(response.status_code, requests.codes.ok)
+        self.assertIn(response.status_code, (requests.codes.ok, requests.codes.created))
         time.sleep(2)
 
     # Load simple bidirectional topology
         time.sleep(2)
 
     # Load simple bidirectional topology