Change way to start simulators
[transportpce.git] / tests / transportpce_tests / 2.2.1 / test_topo_portmapping.py
index 66c0c23d328fb0c271dd87877a6942e735e8472b..d749323b9879ac7b6e1ddfc4315f0e67b982e759 100644 (file)
 import unittest
 import time
 import requests
-from common import test_utils
+import sys
+sys.path.append('transportpce_tests/common/')
+import test_utils
 
 
 class TransportPCEtesting(unittest.TestCase):
 
     processes = None
+    NODE_VERSION = '2.2.1'
 
     @classmethod
     def setUpClass(cls):
         cls.processes = test_utils.start_tpce()
-        cls.processes = test_utils.start_sims(['xpdra', 'roadma'])
+        cls.processes = test_utils.start_sims([('xpdra', cls.NODE_VERSION), ('roadma', cls.NODE_VERSION)])
 
     @classmethod
     def tearDownClass(cls):
@@ -39,7 +42,7 @@ class TransportPCEtesting(unittest.TestCase):
 
     # Connect the ROADMA
     def test_01_connect_rdm(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)
 
     # Verify the termination points of the ROADMA
@@ -78,7 +81,7 @@ class TransportPCEtesting(unittest.TestCase):
 
 #     #Connect the XPDRA
     def test_04_connect_xpdr(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)
 
 #     #Verify the termination points related to XPDR