From: Alina Quereilhac <alina.quereilhac@inria.fr>
Date: Tue, 29 Oct 2013 12:58:30 +0000 (+0100)
Subject: Small bug fixes on unit tests
X-Git-Tag: nepi-3.0.0~25
X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=332038a4a4e7e8c74db87dea003e4c02418175d6;p=nepi.git

Small bug fixes on unit tests
---

diff --git a/test/execution/resource.py b/test/execution/resource.py
index e594f268..88b4156b 100755
--- a/test/execution/resource.py
+++ b/test/execution/resource.py
@@ -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()
 
diff --git a/test/resources/linux/interface.py b/test/resources/linux/interface.py
index 0f332f37..379f92e7 100755
--- a/test/resources/linux/interface.py
+++ b/test/resources/linux/interface.py
@@ -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)
diff --git a/test/resources/omf/vlc.py b/test/resources/omf/vlc.py
index 1dd2a5f6..4d3c1d0e 100755
--- a/test/resources/omf/vlc.py
+++ b/test/resources/omf/vlc.py
@@ -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)