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

Function test_values

tests/fields/test_json.py:314–318  ·  view source on GitHub ↗

Test JSON field in values().

(db)

Source from the content-addressed store, hash-verified

312
313@pytest.mark.asyncio
314async def test_values(db):
315 """Test JSON field in values()."""
316 obj0 = await testmodels.JSONFields.create(data={"some": ["text", 3]})
317 values = await testmodels.JSONFields.filter(id=obj0.id).values("data")
318 assert values[0]["data"] == {"some": ["text", 3]}
319
320
321@pytest.mark.asyncio

Callers

nothing calls this directly

Calls 3

createMethod · 0.45
valuesMethod · 0.45
filterMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…