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

Function test_time_create

tests/fields/test_time.py:462–468  ·  view source on GitHub ↗

Test creating time fields (postgres).

(db)

Source from the content-addressed store, hash-verified

460@test.requireCapability(dialect=NotIn("sqlite")) # 'datetime.time' is not supported by sqlite3
461@test.requireCapability(dialect="postgres")
462async def test_time_create(db):
463 """Test creating time fields (postgres)."""
464 model = testmodels.TimeFields
465 now = timezone.now().timetz()
466 obj0 = await model.create(time=now)
467 obj1 = await model.get(id=obj0.id)
468 assert obj1.time == now
469
470
471@pytest.mark.asyncio

Callers

nothing calls this directly

Calls 2

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…