Change way to start simulators
[transportpce.git] / tests / transportpce_tests / 2.2.1 / test_nbinotifications.py
index b772b36676f5370ceb2d6c6d8a83488e241b9557..628fa8f1085def90355db4a41994dbd4bb6ad457 100644 (file)
@@ -16,7 +16,8 @@ import sys
 import unittest
 import time
 import requests
-from common import test_utils
+sys.path.append('transportpce_tests/common/')
+import test_utils
 
 
 class TransportNbiNotificationstesting(unittest.TestCase):
@@ -111,6 +112,7 @@ class TransportNbiNotificationstesting(unittest.TestCase):
     }
 
     WAITING = 20  # nominal value is 300
+    NODE_VERSION = '2.2.1'
 
     @classmethod
     def setUpClass(cls):
@@ -132,7 +134,10 @@ class TransportNbiNotificationstesting(unittest.TestCase):
             print("NBI notification installation feature failed...")
             test_utils.shutdown_process(cls.processes[0])
             sys.exit(2)
-        cls.processes = test_utils.start_sims(['xpdra', 'roadma', 'roadmc', 'xpdrc'])
+        cls.processes = test_utils.start_sims([('xpdra', cls.NODE_VERSION),
+                                               ('roadma', cls.NODE_VERSION),
+                                               ('roadmc', cls.NODE_VERSION),
+                                               ('xpdrc', cls.NODE_VERSION)])
 
     @classmethod
     def tearDownClass(cls):
@@ -145,19 +150,19 @@ class TransportNbiNotificationstesting(unittest.TestCase):
         print("execution of {}".format(self.id().split(".")[-1]))
 
     def test_01_connect_xpdrA(self):
-        response = test_utils.mount_device("XPDR-A1", 'xpdra')
+        response = test_utils.mount_device("XPDR-A1", ('xpdra', self.NODE_VERSION))
         self.assertEqual(response.status_code, requests.codes.created, test_utils.CODE_SHOULD_BE_201)
 
     def test_02_connect_xpdrC(self):
-        response = test_utils.mount_device("XPDR-C1", 'xpdrc')
+        response = test_utils.mount_device("XPDR-C1", ('xpdrc', self.NODE_VERSION))
         self.assertEqual(response.status_code, requests.codes.created, test_utils.CODE_SHOULD_BE_201)
 
     def test_03_connect_rdmA(self):
-        response = test_utils.mount_device("ROADM-A1", 'roadma')
+        response = test_utils.mount_device("ROADM-A1", ('roadma', self.NODE_VERSION))
         self.assertEqual(response.status_code, requests.codes.created, test_utils.CODE_SHOULD_BE_201)
 
     def test_04_connect_rdmC(self):
-        response = test_utils.mount_device("ROADM-C1", 'roadmc')
+        response = test_utils.mount_device("ROADM-C1", ('roadmc', self.NODE_VERSION))
         self.assertEqual(response.status_code, requests.codes.created, test_utils.CODE_SHOULD_BE_201)
 
     def test_05_connect_xprdA_N1_to_roadmA_PP1(self):