Update power target mask for mixed line-rate
[transportpce.git] / tests / transportpce_tests / 2.2.1 / test09_olm.py
index 4c5316963d449adfaa8d94ae85cdd9951d1712ae..a72c10b106aed4befc9c6b9657ef2df33f657558 100644 (file)
 import unittest
 import time
 import requests
+# pylint: disable=wrong-import-order
 import sys
 sys.path.append('transportpce_tests/common/')
-import test_utils
+# pylint: disable=wrong-import-position
+# pylint: disable=import-error
+import test_utils  # nopep8
 
 
 class TransportOlmTesting(unittest.TestCase):
@@ -41,6 +44,7 @@ class TransportOlmTesting(unittest.TestCase):
         print("all processes killed")
 
     def setUp(self):
+        # pylint: disable=consider-using-f-string
         print("execution of {}".format(self.id().split(".")[-1]))
         time.sleep(1)
 
@@ -232,7 +236,7 @@ class TransportOlmTesting(unittest.TestCase):
                                                    768)
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
-        self.assertIn('Roadm-connection successfully created for nodes', res["output"]["result"])
+        self.assertIn('Interfaces created successfully for nodes', res["output"]["result"])
         # time.sleep(40)
         time.sleep(10)
 
@@ -250,7 +254,7 @@ class TransportOlmTesting(unittest.TestCase):
                                                    768)
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
-        self.assertIn('Roadm-connection successfully created for nodes', res["output"]["result"])
+        self.assertIn('Interfaces created successfully for nodes', res["output"]["result"])
         # time.sleep(40)
         time.sleep(10)
 
@@ -306,7 +310,7 @@ class TransportOlmTesting(unittest.TestCase):
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
         self.assertEqual("gainLoss", res['roadm-connections'][0]['opticalControlMode'])
-        self.assertEqual(2.0, res['roadm-connections'][0]['target-output-power'])
+        self.assertEqual(0.21, res['roadm-connections'][0]['target-output-power'])
 
     def test_22_get_roadmconnection_ROADMC(self):
         response = test_utils.check_netconf_node_request(
@@ -481,7 +485,7 @@ class TransportOlmTesting(unittest.TestCase):
                                                    760)
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
-        self.assertIn('Roadm-connection successfully created for nodes', res["output"]["result"])
+        self.assertIn('Interfaces created successfully for nodes', res["output"]["result"])
         # time.sleep(40)
         time.sleep(10)