X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=transportpce.git;a=blobdiff_plain;f=tests%2Ftransportpce_tests%2F7.1%2Ftest01_portmapping.py;h=6aed5f30971968dc6c4f8eeed699ad397b9211cf;hp=b5317f550fcdd73d4c968a2dc0e8b4959c2abe2c;hb=819d009eb8f97c15bdf074e132612f17f2e4fbc1;hpb=2665436ed0ebfd207e55264f87b9c40fcb1db75c diff --git a/tests/transportpce_tests/7.1/test01_portmapping.py b/tests/transportpce_tests/7.1/test01_portmapping.py index b5317f550..6aed5f309 100644 --- a/tests/transportpce_tests/7.1/test01_portmapping.py +++ b/tests/transportpce_tests/7.1/test01_portmapping.py @@ -155,8 +155,8 @@ class TransportPCE400GPortMappingTesting(unittest.TestCase): res = test_utils_rfc8040.portmapping_mc_capa_request("XPDR-A2", "XPDR-mcprofile") self.assertEqual(res['status_code'], requests.codes.ok) self.assertEqual(res['mc-capabilities'][0]['mc-node-name'], 'XPDR-mcprofile') - self.assertEqual(res['mc-capabilities'][0]['center-freq-granularity'], '3.125') - self.assertEqual(res['mc-capabilities'][0]['slot-width-granularity'], '6.25') + self.assertEqual(str(res['mc-capabilities'][0]['center-freq-granularity']), '3.125') + self.assertEqual(str(res['mc-capabilities'][0]['slot-width-granularity']), '6.25') def test_09_xpdr_device_disconnection(self): response = test_utils_rfc8040.unmount_device("XPDR-A2") @@ -165,20 +165,18 @@ class TransportPCE400GPortMappingTesting(unittest.TestCase): def test_10_xpdr_device_disconnected(self): response = test_utils_rfc8040.check_device_connection("XPDR-A2") 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_11_xpdr_device_not_connected(self): response = test_utils_rfc8040.get_portmapping_node_info("XPDR-A2") 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__':