mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Refs #27025 -- Fixed "invalid escape sequence" warnings in Python 3.6.
http://bugs.python.org/issue27364
This commit is contained in:
@@ -48,8 +48,8 @@ class RegexFieldTest(SimpleTestCase):
|
||||
f.clean('123')
|
||||
six.assertRaisesRegex(
|
||||
self, ValidationError,
|
||||
"'Ensure this value has at least 5 characters \(it has 3\)\.',"
|
||||
" u?'Enter a valid value\.'",
|
||||
r"'Ensure this value has at least 5 characters \(it has 3\)\.',"
|
||||
r" u?'Enter a valid value\.'",
|
||||
f.clean, 'abc'
|
||||
)
|
||||
self.assertEqual('12345', f.clean('12345'))
|
||||
@@ -60,7 +60,7 @@ class RegexFieldTest(SimpleTestCase):
|
||||
f.clean('12345a')
|
||||
|
||||
def test_regexfield_unicode_characters(self):
|
||||
f = RegexField('^\w+$')
|
||||
f = RegexField(r'^\w+$')
|
||||
self.assertEqual('éèøçÎÎ你好', f.clean('éèøçÎÎ你好'))
|
||||
|
||||
def test_change_regex_after_init(self):
|
||||
|
||||
Reference in New Issue
Block a user