Skip to content

Commit f165eb3

Browse files
committed
[python-pydantic-v1] fix test to use localhost
...instead of petstore.swagger.io This was already fixed correspondingly for the regular python client test: https://github.com/OpenAPITools/openapi-generator/pull/20845/files#diff-5564d80a56f0975624d5f89ba58685945973a5370eb68de719a27e65eb900307 Therefore the fix is now also applied to the corresponding python-pydantic-v1 `test_api_exception` test.
1 parent 94330f0 commit f165eb3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

samples/openapi3/client/petstore/python-pydantic-v1/tests/test_api_exception.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,20 @@
1414
import unittest
1515

1616
import petstore_api
17+
from petstore_api import Configuration
1718
from petstore_api.rest import ApiException
1819

1920
from .util import id_gen
2021

22+
HOST = 'http://localhost/v2'
2123

2224
class ApiExceptionTests(unittest.TestCase):
2325

2426
def setUp(self):
25-
self.api_client = petstore_api.ApiClient()
27+
config = Configuration()
28+
config.host = HOST
29+
config.access_token = 'ACCESS_TOKEN'
30+
self.api_client = petstore_api.ApiClient(config)
2631
self.pet_api = petstore_api.PetApi(self.api_client)
2732
self.setUpModels()
2833

0 commit comments

Comments
 (0)