diff --git a/src/postorius/tests/mailman_api_tests/test_list_members.py b/src/postorius/tests/mailman_api_tests/test_list_members.py index 054071c..2364eed 100644 --- a/src/postorius/tests/mailman_api_tests/test_list_members.py +++ b/src/postorius/tests/mailman_api_tests/test_list_members.py @@ -77,7 +77,7 @@ if "%40" not in url: # Django < 1.8 url = quote(url) expected_redirect = "http://testserver%s?next=%s" % ( - settings.LOGIN_URL, url) + reverse(settings.LOGIN_URL), url) self.assertEqual(response.status_code, 302) self.assertEqual(response["location"], expected_redirect) diff --git a/src/postorius/tests/mailman_api_tests/test_list_metrics.py b/src/postorius/tests/mailman_api_tests/test_list_metrics.py index 4c12968..6015391 100644 --- a/src/postorius/tests/mailman_api_tests/test_list_metrics.py +++ b/src/postorius/tests/mailman_api_tests/test_list_metrics.py @@ -48,7 +48,7 @@ if "%40" not in url: # Django < 1.8 url = quote(url) expected_redirect = "http://testserver%s?next=%s" % ( - settings.LOGIN_URL, url) + reverse(settings.LOGIN_URL), url) self.assertEqual(response.status_code, 302) self.assertEqual(response["location"], expected_redirect) diff --git a/testing/test_settings.py b/testing/test_settings.py index 5ca0be5..ff86e57 100755 --- a/testing/test_settings.py +++ b/testing/test_settings.py @@ -141,9 +141,8 @@ # These are only used for development # 'debug_toolbar', ) -LOGIN_URL = '/postorius/accounts/login/' -LOGIN_REDIRECT_URL = '/postorius/' -LOGIN_ERROR_URL = '/postorius/accounts/login/' +LOGIN_URL = 'user_login' +LOGIN_REDIRECT_URL = 'list_index' def username(email): return email.rsplit('@', 1)[0]