Trax-air / swagger-tester

Automatically test your swagger API
MIT License
104 stars 36 forks source link

Test fails if the server's url contains the basePath #51

Closed ThomasHickman closed 6 years ago

ThomasHickman commented 6 years ago

https://github.com/Trax-air/swagger-tester/blob/fb5063bd3a89202c1e60234101fb466f59cfc97c/swagger_tester/swagger_tester.py#L313 should not remove all occurrences of basePath in app_url, just the occurrences of basePath at the end. If the server's url contains the basePath, then all occurrences will be removed and this will fail e.g. if basePath is / or not defined (which defaults to /) and the testing url is http://127.0.0.1:8080, this will fail with exception:

requests.exceptions.InvalidURL: Failed to parse: http:127.0.0.1:8080