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

Function test_time_values

tests/fields/test_time.py:485–491  ·  view source on GitHub ↗

Test time field in values() query (postgres).

(db)

Source from the content-addressed store, hash-verified

483@test.requireCapability(dialect=NotIn("sqlite")) # 'datetime.time' is not supported by sqlite3
484@test.requireCapability(dialect="postgres")
485async def test_time_values(db):
486 """Test time field in values() query (postgres)."""
487 model = testmodels.TimeFields
488 now = timezone.now().timetz()
489 obj0 = await model.create(time=now)
490 values = await model.get(id=obj0.id).values("time")
491 assert values["time"] == now
492
493
494@pytest.mark.asyncio

Callers

nothing calls this directly

Calls 3

createMethod · 0.45
valuesMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…