def __init__(self, config, cls, service_loc): from inbox.server.util.concurrency import make_zerorpc self.server = make_zerorpc(cls, service_loc) self.client = zerorpc.Client(timeout=120) self.client.connect(service_loc)
def set_up(request): test = TestDB() # STILL uses real config!? from inbox.server.api import API from inbox.server.util.concurrency import make_zerorpc test.server = make_zerorpc(API, API_SERVER_LOC) test.client = zerorpc.Client(timeout=5) test.client.connect(API_SERVER_LOC) def fin(): test.destroy() request.addfinalizer(fin) return test.client