Trax-air/swagger-tester

Test fails if the server's url contains the basePath

Closed this issue · 0 comments

full_path = u'{0}{1}'.format(app_url.replace(swagger_parser.base_path, ''), url)
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