def setUp(self): addr = "127.0.0.1" dh = os.environ.get("DOCKER_HOST") if dh: u = urlparse(dh) addr = u.hostname host = "http://{}:23042".format(addr) configuration = gnomock.Configuration(host=host) with gnomock.ApiClient(configuration) as client: self.api = gnomock.PresetsApi(client)
def setUp(self): with gnomock.ApiClient() as client: self.api = gnomock.PresetsApi(client)