You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by pq...@apache.org on 2010/01/05 01:17:05 UTC

svn commit: r895835 - /incubator/libcloud/trunk/test/__init__.py

Author: pquerna
Date: Tue Jan  5 00:17:05 2010
New Revision: 895835

URL: http://svn.apache.org/viewvc?rev=895835&view=rev
Log:
Check the contents of the lists to make sure they are the right types

Modified:
    incubator/libcloud/trunk/test/__init__.py

Modified: incubator/libcloud/trunk/test/__init__.py
URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/test/__init__.py?rev=895835&r1=895834&r2=895835&view=diff
==============================================================================
--- incubator/libcloud/trunk/test/__init__.py (original)
+++ incubator/libcloud/trunk/test/__init__.py Tue Jan  5 00:17:05 2010
@@ -16,7 +16,7 @@
 from cStringIO import StringIO
 from urllib2 import urlparse
 from cgi import parse_qs
-from libcloud.base import Node
+from libcloud.base import Node, NodeImage, NodeSize
 from libcloud.types import NodeState
 import unittest
 
@@ -155,6 +155,8 @@
     def test_list_nodes_response(self):
         nodes = self.driver.list_nodes()
         self.assertTrue(isinstance(nodes, list))
+        for node in nodes:
+            self.assertTrue(isinstance(node, Node))
 
     def test_list_sizes_response(self):
         sizes = self.driver.list_sizes()
@@ -169,6 +171,8 @@
     def test_list_images_response(self):
         images = self.driver.list_images()
         self.assertTrue(isinstance(images, list))
+        for image in images:
+            self.assertTrue(isinstance(image, NodeImage))
 
     def test_create_node_response(self):
         # should return a node object