Small bug fixes on unit tests
authorAlina Quereilhac <alina.quereilhac@inria.fr>
Tue, 29 Oct 2013 12:58:30 +0000 (13:58 +0100)
committerAlina Quereilhac <alina.quereilhac@inria.fr>
Tue, 29 Oct 2013 12:58:30 +0000 (13:58 +0100)
test/execution/resource.py
test/resources/linux/interface.py
test/resources/omf/vlc.py

index e594f26..88b4156 100755 (executable)
@@ -299,16 +299,13 @@ class ResourceManagerTestCase(unittest.TestCase):
 
         node = ec.register_resource("Node")
 
-        apps = list()
-        for i in xrange(10):
-            app = ec.register_resource("ErrorApplication")
-            ec.register_connection(app, node)
-            apps.append(app)
-
+        app = ec.register_resource("ErrorApplication")
+        ec.register_connection(app, node)
+        apps.append(app)
 
         ec.deploy()
 
-        ec.wait_finished(apps)
+        ec.wait_finished(app)
 
         ec.shutdown()
 
index 0f332f3..379f92e 100755 (executable)
@@ -63,7 +63,7 @@ class LinuxInterfaceTestCase(unittest.TestCase):
         ec.deploy()
 
         while not all([ ec.state(guid) == ResourceState.STARTED \
-                for guid in [node, iface]]) and not ec.finished:
+                for guid in [node, iface]]):
             time.sleep(0.5)
 
         self.assertTrue(ec.state(node) == ResourceState.STARTED)
index 1dd2a5f..4d3c1d0 100755 (executable)
@@ -45,7 +45,7 @@ class OMFResourceFactoryTestCase(unittest.TestCase):
     def test_creation_phase(self):
 
         self.assertEquals(OMFNode.rtype(), "OMFNode")
-        self.assertEquals(len(OMFNode._attributes), 5)
+        self.assertEquals(len(OMFNode._attributes), 6)
 
         self.assertEquals(OMFWifiInterface.rtype(), "OMFWifiInterface")
         self.assertEquals(len(OMFWifiInterface._attributes), 9)