summaryrefslogtreecommitdiff
path: root/tests/deprecation
diff options
context:
space:
mode:
authorDiego GuimarĂ£es <diegobr.sistemas@gmail.com>2014-12-05 18:14:20 -0200
committerTim Graham <timograham@gmail.com>2014-12-06 14:46:01 -0500
commit9f427617e4559012e1c2fd8fce46cbe225d8515d (patch)
tree852a64644d99d125d8c90099ffc1408bd12a61c2 /tests/deprecation
parent1917017b8d38a9c330456cbdf2e81b0dc49e6477 (diff)
downloaddjango-9f427617e4559012e1c2fd8fce46cbe225d8515d.tar.gz
Refs #23947 -- Worked around a bug in Python that prevents deprecation warnings from appearing in tests.
Diffstat (limited to 'tests/deprecation')
-rw-r--r--tests/deprecation/tests.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/deprecation/tests.py b/tests/deprecation/tests.py
index 79a6284cf6..dcd50a6d11 100644
--- a/tests/deprecation/tests.py
+++ b/tests/deprecation/tests.py
@@ -5,6 +5,7 @@ import unittest
import warnings
from django.test import SimpleTestCase, RequestFactory, override_settings
+from django.test.utils import reset_warning_registry
from django.utils import six, translation
from django.utils.deprecation import RenameMethodsBase
from django.utils.encoding import force_text
@@ -28,6 +29,7 @@ class RenameMethodsTests(SimpleTestCase):
Ensure a warning is raised upon class definition to suggest renaming
the faulty method.
"""
+ reset_warning_registry()
with warnings.catch_warnings(record=True) as recorded:
warnings.simplefilter('always')