svanoort / pyresttest

Python Rest Testing
Apache License 2.0
1.15k stars 325 forks source link

Base URL doesn't work when it contains a relative path #224

Open d3ming opened 7 years ago

d3ming commented 7 years ago

If I host my endpoints with base URL at http://example.com/dev/ and want to use pyresttest with params: resttest.py http://example.com/dev/ test.yml, it will try to hit URLs ignoring the /dev/ portion.

This is a problem because I'm using the Zappa to deploy my REST API and while locally the endpoints can have a base URL, the deployments with zappa will add another relative path based on if it's the dev or prod instance.

Is there any good way to work around or get the same set of tests to work with two sets of base URLs where one of them contains a relative path?

OlafvdSpek commented 7 years ago

I hit the same issue. I'd like to avoid repeating /v1/ in all tests.