diff --git a/samples/client/petstore/python/tests/test_api_client.py b/samples/client/petstore/python/tests/test_api_client.py index a41dbaba9c9..c9b9edd86c4 100644 --- a/samples/client/petstore/python/tests/test_api_client.py +++ b/samples/client/petstore/python/tests/test_api_client.py @@ -27,7 +27,6 @@ class ApiClientTests(unittest.TestCase): def test_configuration(self): config = petstore_api.Configuration() - config.host = 'http://localhost/' config.api_key['api_key'] = '123456' config.api_key_prefix['api_key'] = 'PREFIX' diff --git a/samples/client/petstore/python/tests/test_pet_api.py b/samples/client/petstore/python/tests/test_pet_api.py index 4f38fbd6e17..80d34f6b5f2 100644 --- a/samples/client/petstore/python/tests/test_pet_api.py +++ b/samples/client/petstore/python/tests/test_pet_api.py @@ -24,7 +24,7 @@ import json import urllib3 -HOST = 'http://localhost/v2' +HOST = 'http://petstore.swagger.io/v2' class TimeoutWithEqual(urllib3.Timeout): @@ -104,13 +104,13 @@ class PetApiTests(unittest.TestCase): mock_pool = MockPoolManager(self) self.api_client.rest_client.pool_manager = mock_pool - mock_pool.expect_request('POST', 'http://localhost/v2/pet', + mock_pool.expect_request('POST', HOST + '/pet', body=json.dumps(self.api_client.sanitize_for_serialization(self.pet)), headers={'Content-Type': 'application/json', 'Authorization': 'Bearer ', 'User-Agent': 'OpenAPI-Generator/1.0.0/python'}, preload_content=True, timeout=TimeoutWithEqual(total=5)) - mock_pool.expect_request('POST', 'http://localhost/v2/pet', + mock_pool.expect_request('POST', HOST + '/pet', body=json.dumps(self.api_client.sanitize_for_serialization(self.pet)), headers={'Content-Type': 'application/json', 'Authorization': 'Bearer ',