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

Function test_create

tests/fields/test_bool.py:14–21  ·  view source on GitHub ↗
(db)

Source from the content-addressed store, hash-verified

12
13@pytest.mark.asyncio
14async def test_create(db):
15 obj0 = await testmodels.BooleanFields.create(boolean=True)
16 obj = await testmodels.BooleanFields.get(id=obj0.id)
17 assert obj.boolean is True
18 assert obj.boolean_null is None
19 await obj.save()
20 obj2 = await testmodels.BooleanFields.get(id=obj.id)
21 assert obj == obj2
22
23
24@pytest.mark.asyncio

Callers

nothing calls this directly

Calls 3

saveMethod · 0.80
createMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…