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

Function test_f_expression

tests/fields/test_float.py:67–71  ·  view source on GitHub ↗
(db)

Source from the content-addressed store, hash-verified

65
66@pytest.mark.asyncio
67async def test_f_expression(db):
68 obj0 = await testmodels.FloatFields.create(floatnum=1.23)
69 await obj0.filter(id=obj0.id).update(floatnum=F("floatnum") + 0.01)
70 obj1 = await testmodels.FloatFields.get(id=obj0.id)
71 assert obj1.floatnum == 1.24

Callers

nothing calls this directly

Calls 5

FClass · 0.90
updateMethod · 0.80
createMethod · 0.45
filterMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…