You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by to...@apache.org on 2011/05/21 15:27:20 UTC

svn commit: r1125695 - /incubator/libcloud/trunk/test/loadbalancer/test_gogrid.py

Author: tomaz
Date: Sat May 21 13:27:20 2011
New Revision: 1125695

URL: http://svn.apache.org/viewvc?rev=1125695&view=rev
Log:
Fix a bug with unittest module in Python 2.7 in the GoGrid load-balancer tests.

Modified:
    incubator/libcloud/trunk/test/loadbalancer/test_gogrid.py

Modified: incubator/libcloud/trunk/test/loadbalancer/test_gogrid.py
URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/test/loadbalancer/test_gogrid.py?rev=1125695&r1=1125694&r2=1125695&view=diff
==============================================================================
--- incubator/libcloud/trunk/test/loadbalancer/test_gogrid.py (original)
+++ incubator/libcloud/trunk/test/loadbalancer/test_gogrid.py Sat May 21 13:27:20 2011
@@ -87,6 +87,17 @@ class GoGridTests(unittest.TestCase):
 class GoGridLBMockHttp(MockHttp, unittest.TestCase):
     fixtures = LoadBalancerFileFixtures('gogrid')
 
+    def __init__(self, *args, **kwargs):
+        unittest.TestCase.__init__(self)
+
+        if kwargs.get('host', None) and kwargs.get('port', None):
+            MockHttp.__init__(self, *args, **kwargs)
+
+    def runTest(self):
+        # @TODO: Add a new base MockHttpTestCase class and add this method and
+        # constructor there
+        pass
+
     def _api_grid_loadbalancer_list(self, method, url, body, headers):
         body = self.fixtures.load('loadbalancer_list.json')
         return (httplib.OK, body, {}, httplib.responses[httplib.OK])