Use url_for to generate URLs

> it is about consistency and updates, if that endpoint changes in the future
> we don't have to update hundreds of tests for a specific string. The actual
> url should be ambiguous we are testing a view endpoint.
This commit is contained in:
Chris Hill-Scott
2016-01-14 11:30:33 +00:00
parent f15a59b0d6
commit 0a46a10316

View File

@@ -28,7 +28,7 @@ def test_should_login_user_and_redirect_to_dashboard(notifications_admin, notifi
data={'sms_code': '12345'})
assert response.status_code == 302
assert response.location == 'http://localhost/services'
assert response.location == url_for('main.choose_service', _external=True)
def test_should_return_200_with_sms_code_error_when_sms_code_is_wrong(notifications_admin,