diff options
author | Tim Graham <timograham@gmail.com> | 2014-06-03 07:30:14 -0400 |
---|---|---|
committer | Tim Graham <timograham@gmail.com> | 2014-06-03 07:30:14 -0400 |
commit | 4445d36d471aae81086ed785536687a92e5aaa6d (patch) | |
tree | 763e51e8d07c10047921e33c852bdfe2e60369a6 /tests/resolve_url | |
parent | e0208944708aa9e1034531a047a731b1c93b50c6 (diff) | |
download | django-4445d36d471aae81086ed785536687a92e5aaa6d.tar.gz |
Fixed #22384 -- Deprecated reversing URLs by dotted path.
Diffstat (limited to 'tests/resolve_url')
-rw-r--r-- | tests/resolve_url/tests.py | 8 |
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): """ |