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

Function test_update

tests/test_update.py:34–41  ·  view source on GitHub ↗
(db)

Source from the content-addressed store, hash-verified

32
33@pytest.mark.asyncio
34async def test_update(db):
35 await Tournament.create(name="1")
36 await Tournament.create(name="3")
37 rows_affected = await Tournament.all().update(name="2")
38 assert rows_affected == 2
39
40 tournament = await Tournament.first()
41 assert tournament.name == "2"
42
43
44@pytest.mark.asyncio

Callers

nothing calls this directly

Calls 4

updateMethod · 0.80
createMethod · 0.45
allMethod · 0.45
firstMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…