X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=transportpce.git;a=blobdiff_plain;f=tests%2Ftransportpce_tests%2F1.2.1%2Ftest01_portmapping.py;h=a595bd555fb76d80c61b9195b4afb0e3ed63a363;hp=9d28b0c4ded65f91c722deb28cc70e3b4ee21a0d;hb=819d009eb8f97c15bdf074e132612f17f2e4fbc1;hpb=2665436ed0ebfd207e55264f87b9c40fcb1db75c diff --git a/tests/transportpce_tests/1.2.1/test01_portmapping.py b/tests/transportpce_tests/1.2.1/test01_portmapping.py index 9d28b0c4d..a595bd555 100644 --- a/tests/transportpce_tests/1.2.1/test01_portmapping.py +++ b/tests/transportpce_tests/1.2.1/test01_portmapping.py @@ -194,20 +194,18 @@ class TransportPCEPortMappingTesting(unittest.TestCase): def test_17_xpdr_device_disconnected(self): response = test_utils_rfc8040.check_device_connection("XPDRA01") self.assertEqual(response['status_code'], requests.codes.conflict) - self.assertIn( - {"error-tag": "data-missing", - "error-message": "Request could not be completed because the relevant data model content does not exist", - "error-type": "protocol"}, - response['connection-status']) + self.assertIn(response['connection-status']['error-type'], ('protocol', 'application')) + self.assertEqual(response['connection-status']['error-tag'], 'data-missing') + self.assertEqual(response['connection-status']['error-message'], + 'Request could not be completed because the relevant data model content does not exist') def test_18_xpdr_device_not_connected(self): response = test_utils_rfc8040.get_portmapping_node_info("XPDRA01") self.assertEqual(response['status_code'], requests.codes.conflict) - self.assertIn( - {"error-tag": "data-missing", - "error-message": "Request could not be completed because the relevant data model content does not exist", - "error-type": "protocol"}, - response['node-info']) + self.assertIn(response['node-info']['error-type'], ('protocol', 'application')) + self.assertEqual(response['node-info']['error-tag'], 'data-missing') + self.assertEqual(response['node-info']['error-message'], + 'Request could not be completed because the relevant data model content does not exist') def test_19_rdm_device_disconnection(self): response = test_utils_rfc8040.unmount_device("ROADMA01") @@ -216,20 +214,18 @@ class TransportPCEPortMappingTesting(unittest.TestCase): def test_20_rdm_device_disconnected(self): response = test_utils_rfc8040.check_device_connection("ROADMA01") self.assertEqual(response['status_code'], requests.codes.conflict) - self.assertIn( - {"error-tag": "data-missing", - "error-message": "Request could not be completed because the relevant data model content does not exist", - "error-type": "protocol"}, - response['connection-status']) + self.assertIn(response['connection-status']['error-type'], ('protocol', 'application')) + self.assertEqual(response['connection-status']['error-tag'], 'data-missing') + self.assertEqual(response['connection-status']['error-message'], + 'Request could not be completed because the relevant data model content does not exist') def test_21_rdm_device_not_connected(self): response = test_utils_rfc8040.get_portmapping_node_info("ROADMA01") self.assertEqual(response['status_code'], requests.codes.conflict) - self.assertIn( - {"error-tag": "data-missing", - "error-message": "Request could not be completed because the relevant data model content does not exist", - "error-type": "protocol"}, - response['node-info']) + self.assertIn(response['node-info']['error-type'], ('protocol', 'application')) + self.assertEqual(response['node-info']['error-tag'], 'data-missing') + self.assertEqual(response['node-info']['error-message'], + 'Request could not be completed because the relevant data model content does not exist') if __name__ == "__main__":