MCPcopy
hub / github.com/tortoise/tortoise-orm / test_exists

Function test_exists

tests/test_queryset.py:48–59  ·  view source on GitHub ↗
(db, intfields_data)

Source from the content-addressed store, hash-verified

46
47@pytest.mark.asyncio
48async def test_exists(db, intfields_data):
49 ret = await IntFields.filter(intnum=0).exists()
50 assert not ret
51
52 ret = await IntFields.filter(intnum=10).exists()
53 assert ret
54
55 ret = await IntFields.filter(intnum__gt=10).exists()
56 assert ret
57
58 ret = await IntFields.filter(intnum__lt=10).exists()
59 assert not ret
60
61
62@pytest.mark.asyncio

Callers

nothing calls this directly

Calls 2

existsMethod · 0.45
filterMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…