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

Function test_validate_str

tests/fields/test_json.py:347–351  ·  view source on GitHub ↗

Test JSON field with validate from string.

(db)

Source from the content-addressed store, hash-verified

345
346@pytest.mark.asyncio
347async def test_validate_str(db):
348 """Test JSON field with validate from string."""
349 obj0 = await testmodels.JSONFields.create(data=[], data_validate='["text", 5]')
350 obj = await testmodels.JSONFields.get(id=obj0.id)
351 assert obj.data_validate == ["text", 5]
352
353
354@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…