MCPcopy Create free account
hub / github.com/tortoise/tortoise-orm / test_contains_smallints

Function test_contains_smallints

tests/fields/test_array.py:100–105  ·  view source on GitHub ↗

Test contains filter on smallint array field.

(db_array_fields)

Source from the content-addressed store, hash-verified

98@requireCapability(dialect="postgres")
99@pytest.mark.asyncio
100async def test_contains_smallints(db_array_fields):
101 """Test contains filter on smallint array field."""
102 obj1 = await testmodels.ArrayFields.create(array=[], array_smallint=[1, 2, 3])
103
104 found = await testmodels.ArrayFields.filter(array_smallint__contains=[2]).first()
105 assert found == obj1
106
107
108@requireCapability(dialect="postgres")

Callers

nothing calls this directly

Calls 3

createMethod · 0.45
firstMethod · 0.45
filterMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…