summaryrefslogtreecommitdiff
path: root/tests/resolve_url
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2014-06-03 07:30:14 -0400
committerTim Graham <timograham@gmail.com>2014-06-03 07:30:14 -0400
commit4445d36d471aae81086ed785536687a92e5aaa6d (patch)
tree763e51e8d07c10047921e33c852bdfe2e60369a6 /tests/resolve_url
parente0208944708aa9e1034531a047a731b1c93b50c6 (diff)
downloaddjango-4445d36d471aae81086ed785536687a92e5aaa6d.tar.gz
Fixed #22384 -- Deprecated reversing URLs by dotted path.
Diffstat (limited to 'tests/resolve_url')
-rw-r--r--tests/resolve_url/tests.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/resolve_url/tests.py b/tests/resolve_url/tests.py
index 542d325e8e..4ea68e460b 100644
--- a/tests/resolve_url/tests.py
+++ b/tests/resolve_url/tests.py
@@ -1,9 +1,11 @@
from __future__ import unicode_literals
+import warnings
from django.core.urlresolvers import NoReverseMatch
from django.contrib.auth.views import logout
from django.shortcuts import resolve_url
from django.test import TestCase, override_settings
+from django.utils.deprecation import RemovedInDjango20Warning
from .models import UnimportantThing
@@ -60,8 +62,10 @@ class ResolveUrlTests(TestCase):
Tests that passing a view function to ``resolve_url`` will result in
the URL path mapping to that view.
"""
- resolved_url = resolve_url('django.contrib.auth.views.logout')
- self.assertEqual('/accounts/logout/', resolved_url)
+ with warnings.catch_warnings():
+ warnings.filterwarnings("ignore", category=RemovedInDjango20Warning)
+ resolved_url = resolve_url('django.contrib.auth.views.logout')
+ self.assertEqual('/accounts/logout/', resolved_url)
def test_domain(self):
"""