From a9ea7d8c708c8265cccc17f23c62b2268d9e94f8 Mon Sep 17 00:00:00 2001 From: Loic Bistuer Date: Wed, 26 Jun 2013 21:30:58 +0700 Subject: Fixed #20462 - Replaced the str() cast introduced in 273dc55 by force_text() --- tests/lookup/tests.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests') 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$'), ['']) + 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 -- cgit v1.3