summaryrefslogtreecommitdiff
path: root/tests/postgres_tests
diff options
context:
space:
mode:
authorSimon Charette <charette.s@gmail.com>2017-01-05 19:03:51 -0500
committerSimon Charette <charette.s@gmail.com>2017-01-06 19:25:32 -0500
commitd976760260c2d8371c1535a7bdeba9a2e0568a34 (patch)
treeb349db75ddaa13ef2cf8205015b76191309a8740 /tests/postgres_tests
parent8516f7c49bfaeb1fa75d16509e05ba5d0933dc58 (diff)
Fixed #27693, Refs #27257 -- Fixed iexact lookup on JSONField keys.
Thanks Harris Lapiroff for the report.
Diffstat (limited to 'tests/postgres_tests')
-rw-r--r--tests/postgres_tests/test_json.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/postgres_tests/test_json.py b/tests/postgres_tests/test_json.py
index 9691329a49..4e8851d485 100644
--- a/tests/postgres_tests/test_json.py
+++ b/tests/postgres_tests/test_json.py
@@ -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())