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

Function test_update

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

Source from the content-addressed store, hash-verified

27
28@pytest.mark.asyncio
29async def test_update(db):
30 obj0 = await testmodels.FloatFields.create(floatnum=1.23)
31 await testmodels.FloatFields.filter(id=obj0.id).update(floatnum=2.34)
32 obj = await testmodels.FloatFields.get(id=obj0.id)
33 assert obj.floatnum == 2.34
34 assert Decimal(obj.floatnum) != Decimal("2.34")
35 assert obj.floatnum_null is None
36
37
38@pytest.mark.asyncio

Callers

nothing calls this directly

Calls 4

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…