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

Function test_update

tests/fields/test_array.py:31–37  ·  view source on GitHub ↗

Test array field update.

(db_array_fields)

Source from the content-addressed store, hash-verified

29@requireCapability(dialect="postgres")
30@pytest.mark.asyncio
31async def test_update(db_array_fields):
32 """Test array field update."""
33 obj0 = await testmodels.ArrayFields.create(array=[0])
34 await testmodels.ArrayFields.filter(id=obj0.id).update(array=[1])
35 obj = await testmodels.ArrayFields.get(id=obj0.id)
36 assert obj.array == [1]
37 assert obj.array_null is None
38
39
40@requireCapability(dialect="postgres")

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…