Reintroduce nb-bierman02 support in new func tests
[transportpce.git] / tests / transportpce_tests / 7.1 / test01_portmapping.py
index b5317f550fcdd73d4c968a2dc0e8b4959c2abe2c..6aed5f30971968dc6c4f8eeed699ad397b9211cf 100644 (file)
@@ -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__':