Merge "Fixed getting the location header"
This commit is contained in:
commit
8704da6f4a
@ -200,7 +200,10 @@ class TestCase(horizon_helpers.TestCase):
|
||||
processing the view which is redirected to.
|
||||
"""
|
||||
if django.VERSION >= (1, 9):
|
||||
loc = str(response._headers.get('location', None)[1])
|
||||
if response.has_header('location'):
|
||||
loc = response['location']
|
||||
else:
|
||||
loc = ''
|
||||
loc = http.urlunquote(loc)
|
||||
expected_url = http.urlunquote(expected_url)
|
||||
self.assertEqual(loc, expected_url)
|
||||
|
Loading…
Reference in New Issue
Block a user