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

Function test_create

tests/fields/test_text.py:15–22  ·  view source on GitHub ↗
(db)

Source from the content-addressed store, hash-verified

13
14@pytest.mark.asyncio
15async def test_create(db):
16 obj0 = await testmodels.TextFields.create(text="baaa" * 32000)
17 obj = await testmodels.TextFields.get(id=obj0.id)
18 assert obj.text == "baaa" * 32000
19 assert obj.text_null is None
20 await obj.save()
21 obj2 = await testmodels.TextFields.get(id=obj.id)
22 assert obj == obj2
23
24
25@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…