diff options
| author | Loic Bistuer <loic.bistuer@sixmedia.com> | 2013-03-06 01:13:36 +0700 |
|---|---|---|
| committer | Loic Bistuer <loic.bistuer@sixmedia.com> | 2013-03-06 01:13:36 +0700 |
| commit | 9ba0e4e4ee2725679ae5cb9e3dd637b0208e5ad3 (patch) | |
| tree | b7b6710e988859d1202eebcc66a3cc306b577bb4 /tests/forms_tests | |
| parent | d9330d5be2ee60b208dcab2616eb164ea2e6bf36 (diff) | |
Fixed minor warnings in tests.
Diffstat (limited to 'tests/forms_tests')
| -rw-r--r-- | tests/forms_tests/tests/regressions.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/forms_tests/tests/regressions.py b/tests/forms_tests/tests/regressions.py index ecee92402e..4249b8afb7 100644 --- a/tests/forms_tests/tests/regressions.py +++ b/tests/forms_tests/tests/regressions.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- from __future__ import unicode_literals -from warnings import catch_warnings +import warnings from django.forms import * from django.test import TestCase @@ -62,8 +62,9 @@ class FormsRegressionsTestCase(TestCase): (b'\xd1\x88\xd1\x82.', b'\xd1\x88\xd1\x82.')) f = ChoiceField(choices=UNITS) self.assertEqual(f.clean('\u0448\u0442.'), '\u0448\u0442.') - with catch_warnings(record=True): + with warnings.catch_warnings(): # Ignore UnicodeWarning + warnings.simplefilter("ignore") self.assertEqual(f.clean(b'\xd1\x88\xd1\x82.'), '\u0448\u0442.') # Translated error messages used to be buggy. |
