diff options
author | Tim Graham <timograham@gmail.com> | 2014-11-26 16:21:29 -0500 |
---|---|---|
committer | Tim Graham <timograham@gmail.com> | 2014-11-29 10:27:04 -0500 |
commit | 3131e9cef5f0a96f4fe667b0b1626c238153d1f1 (patch) | |
tree | 201cc94c137466c1fe55885ef8dc7a02853705e6 /tests/urlpatterns_reverse/urls.py | |
parent | 860eb01d175f88ce9f77bc823f9711eb078db796 (diff) | |
download | django-3131e9cef5f0a96f4fe667b0b1626c238153d1f1.tar.gz |
Fixed #23923 -- Promoted Django's deprecation warnings to errors in runtests.py
Diffstat (limited to 'tests/urlpatterns_reverse/urls.py')
-rw-r--r-- | tests/urlpatterns_reverse/urls.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/urlpatterns_reverse/urls.py b/tests/urlpatterns_reverse/urls.py index 4ba596d81c..825ded40a2 100644 --- a/tests/urlpatterns_reverse/urls.py +++ b/tests/urlpatterns_reverse/urls.py @@ -1,6 +1,7 @@ import warnings from django.conf.urls import patterns, url, include +from django.utils.deprecation import RemovedInDjango20Warning from .views import ( absolute_kwargs_view, defaults_view, empty_view, empty_view_partial, @@ -14,8 +15,8 @@ other_patterns = [ ] # test deprecated patterns() function. convert to list of urls() in Django 2.0 -with warnings.catch_warnings(record=True): - warnings.filterwarnings('ignore', module='django.conf.urls') +with warnings.catch_warnings(): + warnings.filterwarnings('ignore', category=RemovedInDjango20Warning) urlpatterns = patterns('', url(r'^places/([0-9]+)/$', empty_view, name='places'), |