libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erjoh...@apache.org
Subject libcloud git commit: [compute] fix to unittests, s/self.assertTrue(True)/pass/ The idiomatic "noop" for a Python block is `pass`, including unit tests.
Date Sat, 21 Feb 2015 23:47:47 GMT
Repository: libcloud
Updated Branches:
  refs/heads/trunk 26ddc9a7d -> b37df1281


[compute] fix to unittests, s/self.assertTrue(True)/pass/
The idiomatic "noop" for a Python block is `pass`, including unit tests.

Closes #454

Signed-off-by: Eric Johnson <erjohnso@google.com>


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/b37df128
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/b37df128
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/b37df128

Branch: refs/heads/trunk
Commit: b37df1281a70be94fe82537f97c084d05c6c31d4
Parents: 26ddc9a
Author: Misha Brukman <mbrukman@google.com>
Authored: Wed Feb 11 21:58:24 2015 -0500
Committer: Eric Johnson <erjohnso@google.com>
Committed: Sat Feb 21 23:45:33 2015 +0000

----------------------------------------------------------------------
 libcloud/test/compute/test_dreamhost.py |  2 +-
 libcloud/test/compute/test_gridspot.py  | 32 ++++++++++++++--------------
 libcloud/test/compute/test_opsource.py  | 12 +++++------
 3 files changed, 23 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/b37df128/libcloud/test/compute/test_dreamhost.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_dreamhost.py b/libcloud/test/compute/test_dreamhost.py
index eed6469..3f41726 100644
--- a/libcloud/test/compute/test_dreamhost.py
+++ b/libcloud/test/compute/test_dreamhost.py
@@ -51,7 +51,7 @@ class DreamhostTest(unittest.TestCase, TestCaseMixin):
             self.assertTrue(
                 False)  # Above command should have thrown an InvalidCredsException
         except InvalidCredsError:
-            self.assertTrue(True)
+            pass
 
     def test_list_nodes(self):
         """

http://git-wip-us.apache.org/repos/asf/libcloud/blob/b37df128/libcloud/test/compute/test_gridspot.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_gridspot.py b/libcloud/test/compute/test_gridspot.py
index 0160f8e..eec4506 100644
--- a/libcloud/test/compute/test_gridspot.py
+++ b/libcloud/test/compute/test_gridspot.py
@@ -51,7 +51,7 @@ class GridspotTest(unittest.TestCase, TestCaseMixin):
             # Above command should have thrown an InvalidCredsException
             self.assertTrue(False)
         except InvalidCredsError:
-            self.assertTrue(True)
+            pass
 
     def test_list_nodes(self):
         nodes = self.driver.list_nodes()
@@ -90,7 +90,7 @@ class GridspotTest(unittest.TestCase, TestCaseMixin):
         """
         Gridspot does not implement this functionality
         """
-        self.assertTrue(True)
+        pass
 
     def test_destroy_node(self):
         """
@@ -104,85 +104,85 @@ class GridspotTest(unittest.TestCase, TestCaseMixin):
         Gridspot does not fail a destroy node unless the parameters are bad, in
         which case it 404s
         """
-        self.assertTrue(True)
+        pass
 
     def test_reboot_node(self):
         """
         Gridspot does not implement this functionality
         """
-        self.assertTrue(True)
+        pass
 
     def test_reboot_node_failure(self):
         """
         Gridspot does not implement this functionality
         """
-        self.assertTrue(True)
+        pass
 
     def test_resize_node(self):
         """
         Gridspot does not implement this functionality
         """
-        self.assertTrue(True)
+        pass
 
     def test_reboot_node_response(self):
         """
         Gridspot does not implement this functionality
         """
-        self.assertTrue(True)
+        pass
 
     def test_list_images_response(self):
         """
         Gridspot does not implement this functionality
         """
-        self.assertTrue(True)
+        pass
 
     def test_create_node_response(self):
         """
         Gridspot does not implement this functionality
         """
-        self.assertTrue(True)
+        pass
 
     def test_destroy_node_response(self):
         """
         Gridspot does not implement this functionality
         """
-        self.assertTrue(True)
+        pass
 
     def test_list_sizes_response(self):
         """
         Gridspot does not implement this functionality
         """
-        self.assertTrue(True)
+        pass
 
     def test_resize_node_failure(self):
         """
         Gridspot does not implement this functionality
         """
-        self.assertTrue(True)
+        pass
 
     def test_list_images(self):
         """
         Gridspot does not implement this functionality
         """
-        self.assertTrue(True)
+        pass
 
     def test_list_sizes(self):
         """
         Gridspot does not implement this functionality
         """
-        self.assertTrue(True)
+        pass
 
     def test_list_locations(self):
         """
         Gridspot does not implement this functionality
         """
-        self.assertTrue(True)
+        pass
 
     def test_list_locations_response(self):
         """
         Gridspot does not implement this functionality
         """
-        self.assertTrue(True)
+        pass
 
 
 class GridspotMockHttp(MockHttp):

http://git-wip-us.apache.org/repos/asf/libcloud/blob/b37df128/libcloud/test/compute/test_opsource.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_opsource.py b/libcloud/test/compute/test_opsource.py
index f9efdcf..b39bf23 100644
--- a/libcloud/test/compute/test_opsource.py
+++ b/libcloud/test/compute/test_opsource.py
@@ -42,7 +42,7 @@ class OpsourceTests(unittest.TestCase, TestCaseMixin):
             self.assertTrue(
                 False)  # Above command should have thrown an InvalidCredsException
         except InvalidCredsError:
-            self.assertTrue(True)
+            pass
 
     def test_list_sizes_response(self):
         OpsourceMockHttp.type = None
@@ -66,7 +66,7 @@ class OpsourceTests(unittest.TestCase, TestCaseMixin):
             self.assertTrue(
                 False)  # above command should have thrown OpsourceAPIException
         except OpsourceAPIException:
-            self.assertTrue(True)
+            pass
 
     def test_destroy_node_response(self):
         node = Node(id='11', name=None, state=None,
@@ -83,7 +83,7 @@ class OpsourceTests(unittest.TestCase, TestCaseMixin):
             self.assertTrue(
                 False)  # above command should have thrown OpsourceAPIException
         except OpsourceAPIException:
-            self.assertTrue(True)
+            pass
 
     def test_create_node_response(self):
         rootPw = NodeAuthPassword('pass123')
@@ -110,7 +110,7 @@ class OpsourceTests(unittest.TestCase, TestCaseMixin):
             self.assertTrue(
                 False)  # above command should have thrown OpsourceAPIException
         except OpsourceAPIException:
-            self.assertTrue(True)
+            pass
 
     def test_ex_start_node(self):
         node = Node(id='11', name=None, state=None,
@@ -127,7 +127,7 @@ class OpsourceTests(unittest.TestCase, TestCaseMixin):
             self.assertTrue(
                 False)  # above command should have thrown OpsourceAPIException
         except OpsourceAPIException:
-            self.assertTrue(True)
+            pass
 
     def test_ex_power_off(self):
         node = Node(id='11', name=None, state=None,
@@ -144,7 +144,7 @@ class OpsourceTests(unittest.TestCase, TestCaseMixin):
             self.assertTrue(
                 False)  # above command should have thrown OpsourceAPIException
         except OpsourceAPIException:
-            self.assertTrue(True)
+            pass
 
     def test_ex_list_networks(self):
         nets = self.driver.ex_list_networks()


Mime
View raw message