Commits

Sümer Cip committed 2c6cc97

client is being prepared to be moved.

Comments (0)

Files changed (2)

test/lightcacheclient.py

 import socket
 import testconf
 from protocolconf import *
-
-def make_client():
-    if testconf.use_unix_socket:
-        client = LightCacheClient(socket.AF_UNIX, socket.SOCK_STREAM) 
-        client.connect(testconf.unix_socket_path)
-    else:    
-        client = LightCacheClient(socket.AF_INET, socket.SOCK_STREAM)  	        
-        client.connect((testconf.host, testconf.port)) 
-    return client
     
 class Response:
     opcode = None
 import unittest
 import socket
-from lightcacheclient import make_client
+import testconf
+from lightcacheclient import LightCacheClient
 from protocolconf import *
 
+def make_client():
+    if testconf.use_unix_socket:
+        client = LightCacheClient(socket.AF_UNIX, socket.SOCK_STREAM) 
+        client.connect(testconf.unix_socket_path)
+    else:    
+        client = LightCacheClient(socket.AF_INET, socket.SOCK_STREAM)  	        
+        client.connect((testconf.host, testconf.port)) 
+    return client
+
 class LightCacheTestBase(unittest.TestCase):
      
     def setUp(self):