Ticket #30826: test-30826.diff

File test-30826.diff, 677 bytes (added by Mariusz Felisiak, 21 months ago)

Regression test.

  • tests/postgres_tests/test_json.py

    diff --git a/tests/postgres_tests/test_json.py b/tests/postgres_tests/test_json.py
    index 39cba8f695..b847210a37 100644
    a b class TestQuerying(PostgreSQLTestCase): 
    309309        ).filter(value__a='b')
    310310        self.assertSequenceEqual(qs, [self.objs[7], self.objs[8]])
    311311
     312    def test_key_lookup_with_contains(self):
     313        self.assertSequenceEqual(
     314            JSONModel.objects.filter(field__d__contains='e'),
     315            [self.objs[8]],
     316        )
     317
    312318    def test_deep_lookup_objs(self):
    313319        self.assertSequenceEqual(
    314320            JSONModel.objects.filter(field__k__l='m'),
Back to Top