diff options
| author | Tim Graham <timograham@gmail.com> | 2015-09-01 10:30:32 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-09-23 19:31:10 -0400 |
| commit | f1761e3fefadd9730e8b17c0995e1317c58bd10c (patch) | |
| tree | 5a506ea142f083b7d4aa672650664754ed6c8363 /tests | |
| parent | fd6a299cd06fac615ccb9006df0dd98cd8461cc5 (diff) | |
Refs #21648 -- Removed is_admin_site option from password_reset() view.
Per deprecation timeline.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/auth_tests/test_views.py | 18 | ||||
| -rw-r--r-- | tests/auth_tests/urls.py | 1 |
2 files changed, 1 insertions, 18 deletions
diff --git a/tests/auth_tests/test_views.py b/tests/auth_tests/test_views.py index 723b20a812..b23d895152 100644 --- a/tests/auth_tests/test_views.py +++ b/tests/auth_tests/test_views.py @@ -24,11 +24,8 @@ from django.core.urlresolvers import NoReverseMatch, reverse, reverse_lazy from django.db import connection from django.http import HttpRequest, QueryDict from django.middleware.csrf import CsrfViewMiddleware, get_token -from django.test import ( - TestCase, ignore_warnings, modify_settings, override_settings, -) +from django.test import TestCase, modify_settings, override_settings from django.test.utils import patch_logger -from django.utils.deprecation import RemovedInDjango110Warning from django.utils.encoding import force_text from django.utils.http import urlquote from django.utils.six.moves.urllib.parse import ParseResult, urlparse @@ -209,19 +206,6 @@ class PasswordResetTest(AuthViewsTestCase): self.assertEqual(len(mail.outbox), 1) self.assertEqual("staffmember@example.com", mail.outbox[0].from_email) - @ignore_warnings(category=RemovedInDjango110Warning) - @override_settings(ALLOWED_HOSTS=['adminsite.com']) - def test_admin_reset(self): - "If the reset view is marked as being for admin, the HTTP_HOST header is used for a domain override." - response = self.client.post('/admin_password_reset/', - {'email': 'staffmember@example.com'}, - HTTP_HOST='adminsite.com' - ) - self.assertEqual(response.status_code, 302) - self.assertEqual(len(mail.outbox), 1) - self.assertIn("http://adminsite.com", mail.outbox[0].body) - self.assertEqual(settings.DEFAULT_FROM_EMAIL, mail.outbox[0].from_email) - # Skip any 500 handler action (like sending more mail...) @override_settings(DEBUG_PROPAGATE_EXCEPTIONS=True) def test_poisoned_http_host(self): diff --git a/tests/auth_tests/urls.py b/tests/auth_tests/urls.py index 0c43123f87..bc68c3f216 100644 --- a/tests/auth_tests/urls.py +++ b/tests/auth_tests/urls.py @@ -85,7 +85,6 @@ urlpatterns = auth_urlpatterns + [ dict(post_reset_redirect='password_reset')), url(r'^password_change/custom/$', views.password_change, dict(post_change_redirect='/custom/')), url(r'^password_change/custom/named/$', views.password_change, dict(post_change_redirect='password_reset')), - url(r'^admin_password_reset/$', views.password_reset, dict(is_admin_site=True)), url(r'^login_required/$', login_required(views.password_reset)), url(r'^login_required_login_url/$', login_required(views.password_reset, login_url='/somewhere/')), |
