1
0
mirror of https://github.com/django/django.git synced 2025-10-27 15:46:10 +00:00

Fixed #20462 - Replaced the str() cast introduced in 273dc55 by force_text()

This commit is contained in:
Loic Bistuer
2013-06-26 21:30:58 +07:00
parent 273dc550a4
commit a9ea7d8c70
2 changed files with 9 additions and 1 deletions

View File

@@ -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