Permalink
Browse files

Make the assertion failure msg more robust

  • Loading branch information...
1 parent ac576ef commit 8eb33846bbbf83945c9cc1952282b6a5687ec177 @m8ttyB m8ttyB committed Oct 12, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 tests/test_redirects.py
@@ -49,7 +49,11 @@ def test_that_checks_redirect_using_locales_and_os(self, testsetup, lang, os):
parsed_url = urlparse(response.url)
- Assert.equal(response.status_code, requests.codes.ok, 'Failed on %s \nUsing %s' % (url, param))
+ Assert.equal(response.status_code, requests.codes.ok,
+ 'Redirect failed with HTTP status %s on %s \n \
+ For %s\n \
+ Redirected to %s' % \
+ (response.status_code, url, param, response.url))
Assert.equal(parsed_url.scheme, 'http', 'Failed on %s \nUsing %s' % (url, param))
@pytest.mark.xfail(reason='there currently is not a stub installer -- xfailing until one lands in the wild')

0 comments on commit 8eb3384

Please sign in to comment.