Closed cdent closed 7 years ago
It's not clear to me if this is the right solution. It breaks when a URL such as /prefix/prefix/foo/bar
is actually legit in the system. Is that a problem?
/cc @FND
Note that urlparse.urljoin
is not workable for this stuff because it only joins if the second argument doesn't begin with /
and the first argument ends with /
, which is just not how the concept of "prefix" works.
If a reponse includes an absolute link, re-using that link as the url in a subsequent test when a prefix is being used in the tests can result in a 404 because the prefix will be duplicated.
This change ensures that the prefix will not be duplicated if the URL already begins with the prefix.
Fixes #165