jarus / flask-testing

Unittest extensions for Flask
http://pythonhosted.org/Flask-Testing/
Other
501 stars 110 forks source link

Use `urljoin()` in assertRedirects instead of string concatenation #61

Closed migurski closed 8 years ago

migurski commented 10 years ago

String concatenation does not correctly detect redirects across domains. Using urlparse.urljoin() accounts for the basic case already covered by simple concatenation, as well as redirects across domains.

jcass77 commented 8 years ago

@migurski, it looks like the Python 3 tests are failing for this PR.

migurski commented 8 years ago

I updated the import to work with both Python 2 and Python 3.

jcomo commented 8 years ago

There were conflicts with the merge due to hold old this PR is. I cherry-picked out your changes and merged here: https://github.com/jarus/flask-testing/commit/70a4bda0d888b2e2850454527edeacf1e939944d.

migurski commented 8 years ago

Thanks