diff options
| author | Tim Graham <timograham@gmail.com> | 2014-04-01 20:46:34 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2014-04-03 07:28:10 -0400 |
| commit | d73d0e071c1b4c86d57994a0ab55a74cfe80cdf5 (patch) | |
| tree | f36eebaf1cdd8bd07503b3a538e7d875ff8d29b4 /tests/test_utils | |
| parent | e6ced2bb086396b57601d04ad5b3ba347d1eb785 (diff) | |
Fixed #22218 -- Deprecated django.conf.urls.patterns.
Thanks Carl Meyer for the suggestion and Alex Gaynor and Carl for reviews.
Diffstat (limited to 'tests/test_utils')
| -rw-r--r-- | tests/test_utils/tests.py | 6 | ||||
| -rw-r--r-- | tests/test_utils/urls.py | 10 |
2 files changed, 8 insertions, 8 deletions
diff --git a/tests/test_utils/tests.py b/tests/test_utils/tests.py index d3c7aec1f3..f41c06e647 100644 --- a/tests/test_utils/tests.py +++ b/tests/test_utils/tests.py @@ -3,7 +3,7 @@ from __future__ import unicode_literals import unittest -from django.conf.urls import patterns, url +from django.conf.urls import url from django.core.urlresolvers import reverse from django.db import connection from django.forms import EmailField, IntegerField @@ -628,11 +628,11 @@ def fake_view(request): class FirstUrls: - urlpatterns = patterns('', url(r'first/$', fake_view, name='first')) + urlpatterns = [url(r'first/$', fake_view, name='first')] class SecondUrls: - urlpatterns = patterns('', url(r'second/$', fake_view, name='second')) + urlpatterns = [url(r'second/$', fake_view, name='second')] class OverrideSettingsTests(TestCase): diff --git a/tests/test_utils/urls.py b/tests/test_utils/urls.py index c3f2ec4e4b..4aade3d572 100644 --- a/tests/test_utils/urls.py +++ b/tests/test_utils/urls.py @@ -1,9 +1,9 @@ -from django.conf.urls import patterns +from django.conf.urls import url from . import views -urlpatterns = patterns('', - (r'^test_utils/get_person/(\d+)/$', views.get_person), - (r'^test_utils/no_template_used/$', views.no_template_used), -) +urlpatterns = [ + url(r'^test_utils/get_person/(\d+)/$', views.get_person), + url(r'^test_utils/no_template_used/$', views.no_template_used), +] |
