Fixed #27693, Refs #27257 -- Fixed iexact lookup on JSONField keys.

Thanks Harris Lapiroff for the report.
This commit is contained in:
Simon Charette 2017-01-05 19:03:51 -05:00
parent 8516f7c49b
commit d976760260
2 changed files with 9 additions and 0 deletions

View file

@ -238,6 +238,10 @@ class TestQuerying(PostgreSQLTestCase):
self.objs[7:9]
)
def test_iexact(self):
self.assertTrue(JSONModel.objects.filter(field__foo__iexact='BaR').exists())
self.assertFalse(JSONModel.objects.filter(field__foo__iexact='"BaR"').exists())
def test_icontains(self):
self.assertFalse(JSONModel.objects.filter(field__foo__icontains='"bar"').exists())