diff options
| author | Loic Bistuer <loic.bistuer@sixmedia.com> | 2013-06-26 21:30:58 +0700 |
|---|---|---|
| committer | Loic Bistuer <loic.bistuer@sixmedia.com> | 2013-06-26 21:30:58 +0700 |
| commit | a9ea7d8c708c8265cccc17f23c62b2268d9e94f8 (patch) | |
| tree | 8ae08ee22eed76b240c8a7ed701541a267a09b17 /tests | |
| parent | 273dc550a4eccdad958541f456332312b3369504 (diff) | |
Fixed #20462 - Replaced the str() cast introduced in 273dc55 by force_text()
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/lookup/tests.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/lookup/tests.py b/tests/lookup/tests.py index fe8a5fac64..ee9c5afe1d 100644 --- a/tests/lookup/tests.py +++ b/tests/lookup/tests.py @@ -625,6 +625,13 @@ class LookupTests(TestCase): self.assertQuerysetEqual(Season.objects.filter(gt__regex=r'^444$'), ['<Season: 2013>']) + def test_regex_non_ascii(self): + """ + Ensure that a regex lookup does not trip on non-ascii characters. + """ + Player.objects.create(name='\u2660') + Player.objects.get(name__regex='\u2660') + def test_nonfield_lookups(self): """ Ensure that a lookup query containing non-fields raises the proper |
