libcloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From je...@apache.org
Subject svn commit: r909105 - in /incubator/libcloud/trunk/test: test_base.py test_ec2.py test_linode.py test_rackspace.py test_rimuhosting.py test_slicehost.py test_vcloud.py test_voxel.py test_vpsnet.py
Date Thu, 11 Feb 2010 18:56:34 GMT
Author: jerry
Date: Thu Feb 11 18:56:21 2010
New Revision: 909105

URL: http://svn.apache.org/viewvc?rev=909105&view=rev
Log:
Added unittest.main() for individual testing (w/ PYTHONPATH=..)

Modified:
    incubator/libcloud/trunk/test/test_base.py
    incubator/libcloud/trunk/test/test_ec2.py
    incubator/libcloud/trunk/test/test_linode.py
    incubator/libcloud/trunk/test/test_rackspace.py
    incubator/libcloud/trunk/test/test_rimuhosting.py
    incubator/libcloud/trunk/test/test_slicehost.py
    incubator/libcloud/trunk/test/test_vcloud.py
    incubator/libcloud/trunk/test/test_voxel.py
    incubator/libcloud/trunk/test/test_vpsnet.py

Modified: incubator/libcloud/trunk/test/test_base.py
URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/test/test_base.py?rev=909105&r1=909104&r2=909105&view=diff
==============================================================================
--- incubator/libcloud/trunk/test/test_base.py (original)
+++ incubator/libcloud/trunk/test/test_base.py Thu Feb 11 18:56:21 2010
@@ -12,6 +12,7 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
+import sys
 import unittest
 
 from libcloud.providers import DRIVERS, get_driver
@@ -91,3 +92,6 @@
 #        if failures:
 #            self.fail('the following drivers did not throw an \
 #                       InvalidCredsException: %s' % (', '.join(failures)))
+
+if __name__ == '__main__':
+    sys.exit(unittest.main())

Modified: incubator/libcloud/trunk/test/test_ec2.py
URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/test/test_ec2.py?rev=909105&r1=909104&r2=909105&view=diff
==============================================================================
--- incubator/libcloud/trunk/test/test_ec2.py (original)
+++ incubator/libcloud/trunk/test/test_ec2.py Thu Feb 11 18:56:21 2010
@@ -12,6 +12,7 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
+import sys
 import unittest
 
 from libcloud.drivers.ec2 import EC2NodeDriver
@@ -185,3 +186,6 @@
     </instancesSet>
 </TerminateInstancesResponse>"""
         return (httplib.OK, body, {}, httplib.responses[httplib.OK])
+
+if __name__ == '__main__':
+    sys.exit(unittest.main())

Modified: incubator/libcloud/trunk/test/test_linode.py
URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/test/test_linode.py?rev=909105&r1=909104&r2=909105&view=diff
==============================================================================
--- incubator/libcloud/trunk/test/test_linode.py (original)
+++ incubator/libcloud/trunk/test/test_linode.py Thu Feb 11 18:56:21 2010
@@ -17,6 +17,7 @@
 # Based upon code written by Alex Polvi <polvi@cloudkick.com>
 #
 
+import sys
 from libcloud.drivers.linode import LinodeNodeDriver
 from libcloud.base import Node, NodeAuthPassword
 from test import MockHttp, TestCaseMixin
@@ -131,3 +132,6 @@
     def _linode_ip_list(self, method, url, body, headers):
         body = '{"ACTION": "linode.ip.list", "DATA": [{"RDNS_NAME": "li22-54.members.linode.com",
"ISPUBLIC": 1, "IPADDRESS": "75.127.96.54", "IPADDRESSID": 5384, "LINODEID": 8098}, {"RDNS_NAME":
"li22-245.members.linode.com", "ISPUBLIC": 1, "IPADDRESS": "75.127.96.245", "IPADDRESSID":
5575, "LINODEID": 8098}], "ERRORARRAY": []}'
         return (httplib.OK, body, {}, httplib.responses[httplib.OK])
+
+if __name__ == '__main__':
+    sys.exit(unittest.main())

Modified: incubator/libcloud/trunk/test/test_rackspace.py
URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/test/test_rackspace.py?rev=909105&r1=909104&r2=909105&view=diff
==============================================================================
--- incubator/libcloud/trunk/test/test_rackspace.py (original)
+++ incubator/libcloud/trunk/test/test_rackspace.py Thu Feb 11 18:56:21 2010
@@ -12,6 +12,7 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
+import sys
 import unittest
 
 from libcloud.types import InvalidCredsException
@@ -142,3 +143,6 @@
         # only used by destroy node()
         return (httplib.ACCEPTED, "", {}, httplib.responses[httplib.ACCEPTED])
 
+
+if __name__ == '__main__':
+    sys.exit(unittest.main())

Modified: incubator/libcloud/trunk/test/test_rimuhosting.py
URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/test/test_rimuhosting.py?rev=909105&r1=909104&r2=909105&view=diff
==============================================================================
--- incubator/libcloud/trunk/test/test_rimuhosting.py (original)
+++ incubator/libcloud/trunk/test/test_rimuhosting.py Thu Feb 11 18:56:21 2010
@@ -14,6 +14,7 @@
 # limitations under the License.
 # Copyright 2009 RedRata Ltd
 
+import sys
 from libcloud.drivers.rimuhosting import RimuHostingNodeDriver
 from test import MockHttp
 from test import MockHttp, TestCaseMixin
@@ -283,3 +284,6 @@
         """
         return (httplib.OK, body, {}, httplib.responses[httplib.OK])
 
+
+if __name__ == '__main__':
+    sys.exit(unittest.main())

Modified: incubator/libcloud/trunk/test/test_slicehost.py
URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/test/test_slicehost.py?rev=909105&r1=909104&r2=909105&view=diff
==============================================================================
--- incubator/libcloud/trunk/test/test_slicehost.py (original)
+++ incubator/libcloud/trunk/test/test_slicehost.py Thu Feb 11 18:56:21 2010
@@ -12,6 +12,7 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
+import sys
 import unittest
 
 from libcloud.drivers.slicehost import SlicehostNodeDriver as Slicehost
@@ -288,3 +289,6 @@
     def _slices_1_destroy_xml(self, method, url, body, headers):
         body = ''
         return (httplib.OK, body, {}, httplib.responses[httplib.OK])
+
+if __name__ == '__main__':
+    sys.exit(unittest.main())

Modified: incubator/libcloud/trunk/test/test_vcloud.py
URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/test/test_vcloud.py?rev=909105&r1=909104&r2=909105&view=diff
==============================================================================
--- incubator/libcloud/trunk/test/test_vcloud.py (original)
+++ incubator/libcloud/trunk/test/test_vcloud.py Thu Feb 11 18:56:21 2010
@@ -12,6 +12,7 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
+import sys
 import unittest
 import exceptions
 
@@ -327,3 +328,6 @@
         return (httplib.ACCEPTED, body, headers, httplib.responses[httplib.ACCEPTED])
 
       
+
+if __name__ == '__main__':
+    sys.exit(unittest.main())

Modified: incubator/libcloud/trunk/test/test_voxel.py
URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/test/test_voxel.py?rev=909105&r1=909104&r2=909105&view=diff
==============================================================================
--- incubator/libcloud/trunk/test/test_voxel.py (original)
+++ incubator/libcloud/trunk/test/test_voxel.py Thu Feb 11 18:56:21 2010
@@ -12,6 +12,7 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
+import sys
 import unittest
 
 from libcloud.drivers.voxel import VoxelNodeDriver as Voxel
@@ -48,3 +49,6 @@
 <rsp stat="fail"><err code="1" msg="Invalid login or password"/><method>voxel.devices.list</method><parameters><param
name="timestamp">2010-02-10T23:39:25.808107+0000</param><param name="key">authshouldfail</param><param
name="api_sig">ae069bb835e998622caaddaeff8c98e0</param></parameters><string_to_sign>YOUR_SECRETtimestamp2010-02-10T23:39:25.808107+0000methodvoxel.devices.listkeyauthshouldfail</string_to_sign></rsp>
 """
         return (httplib.OK, body, {}, httplib.responses[httplib.OK])
+
+if __name__ == '__main__':
+    sys.exit(unittest.main())

Modified: incubator/libcloud/trunk/test/test_vpsnet.py
URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/test/test_vpsnet.py?rev=909105&r1=909104&r2=909105&view=diff
==============================================================================
--- incubator/libcloud/trunk/test/test_vpsnet.py (original)
+++ incubator/libcloud/trunk/test/test_vpsnet.py Thu Feb 11 18:56:21 2010
@@ -12,6 +12,7 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
+import sys
 import unittest
 import exceptions
 
@@ -203,3 +204,6 @@
     def _available_clouds_api10json_create(self, method, url, body, headers):
         body = """[{"cloud":{"system_templates":[{"id":9,"label":"Ubuntu 8.04 x64"}],"id":2,"label":"USA
VPS Cloud"}}]"""
         return (httplib.OK, body, {}, httplib.responses[httplib.OK])
+
+if __name__ == '__main__':
+    sys.exit(unittest.main())



Mime
View raw message