diff options
| author | Julien Phalip <jphalip@gmail.com> | 2012-05-31 11:45:35 -0700 |
|---|---|---|
| committer | Julien Phalip <jphalip@gmail.com> | 2012-05-31 11:45:35 -0700 |
| commit | f6fc83c97514ced9de48ca9ea442a9b166d3e211 (patch) | |
| tree | 17eb19cb7ad0ba7327b313062c00a9a2947d4fee /tests | |
| parent | ba10be70322027074e5f9defc1423eb0cc77473c (diff) | |
Fixed #18409 -- Made RegexField work with unicode characters.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/regressiontests/forms/tests/fields.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/regressiontests/forms/tests/fields.py b/tests/regressiontests/forms/tests/fields.py index d66ee2c084..c4a8a9a3fa 100644 --- a/tests/regressiontests/forms/tests/fields.py +++ b/tests/regressiontests/forms/tests/fields.py @@ -478,6 +478,14 @@ class FieldsTests(SimpleTestCase): self.assertRaisesMessage(ValidationError, "[u'Ensure this value has at most 10 characters (it has 11).']", f.clean, '12345678901') self.assertRaisesMessage(ValidationError, "[u'Enter a valid value.']", f.clean, '12345a') + def test_regexfield_6(self): + """ + Ensure that it works with unicode characters. + Refs #. + """ + f = RegexField('^\w+$') + self.assertEqual(u'éèøçÎÎ你好', f.clean(u'éèøçÎÎ你好')) + def test_change_regex_after_init(self): f = RegexField('^[a-z]+$') f.regex = '^\d+$' |
