diff wibble/tests.py @ 9:23743b0f67ab

Moved client.ServerProxy into client.__init__
author Ben Croston <ben@croston.org>
date Sun, 04 Sep 2011 23:44:50 +0100
parents 685479d1f0a7
children 58e764e39492
line wrap: on
line diff
--- a/wibble/tests.py	Sun Sep 04 23:37:41 2011 +0100
+++ b/wibble/tests.py	Sun Sep 04 23:44:50 2011 +0100
@@ -34,7 +34,7 @@
 ##### client vvv #####
 class NotAuthTest(unittest.TestCase):
     def runTest(self):
-        from client.ServerProxy import ServerProxy, UnauthorisedException
+        from client import ServerProxy, UnauthorisedException
         self.client = ServerProxy('http://localhost:1337/',
                                   username='testuser',
                                   password='s3cr3t',
@@ -44,7 +44,7 @@
 
 class WibbleTests(unittest.TestCase):
     def setUp(self):
-        from client.ServerProxy import ServerProxy
+        from client import ServerProxy
         self.client = ServerProxy('http://localhost:1337/',
                                   username='testuser',
                                   password='s3cr3t',
@@ -61,7 +61,7 @@
 
 class BadRequestTest(WibbleTests):
     def runTest(self):
-        from client.ServerProxy import BadRequestException
+        from client import BadRequestException
         with self.assertRaises(BadRequestException):
             self.client.FunctionDoesNotExist()
 
@@ -98,7 +98,7 @@
 
 if __name__ == '__main__':
     import sys
-    if platform.python_version().startswith('2 ') and 'serve' in sys.argv:
+    if platform.python_version().startswith('2') and 'serve' in sys.argv:
         print 'Listening on port 1337 (Ctrl-C qo quit)...'
         server = make_server()
         try: