def assert_redirects(response, location):
assert response.status_code in (<NUM_LIT>, <NUM_LIT>)<EOL>assert response.location == '<STR_LIT>' + location<EOL>
Checks if response is an HTTP redirect to the
given location.

:param response: Flask response
:param location: relative URL (i.e. without **http://localhost**)