svanoort / pyresttest

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

Clean up URL to eliminate double slashes when templating #182

Closed danielatdattrixdotcom closed 8 years ago

danielatdattrixdotcom commented 8 years ago

When extracting resource URIs and using them via extraction and tempting an extra leading slash would be added. Also ensures a trailing slash in the URL is retained.

svanoort-jenkins commented 8 years ago

Can one of the admins verify this patch?

svanoort commented 8 years ago

I like it, looks good to me!

svanoort commented 8 years ago

@danielatdattrixdotcom I had to do a quick revert in master, because we both forgot about the scheme prefix for the URL - it will convert http://somewhere.com to http:/somewhere.com - I'll revisit this soon, probably the better solution will involve a little more use of urlparse.

danielatdattrixdotcom commented 8 years ago

@svanoort I revised my work and re-created the branch. Can you move this backwards from merged, or do I need to create another?

svanoort commented 8 years ago

@danielatdattrixdotcom Github doesn't really support un-merge / re-merge, unfortunately. I recently had to comment on a (mistakenly marked as merged) PR "This is not actually merged. Go home Github, you're drunk." :laughing:

So, I'm afraid we'll have to create a new PR for the fixed version.