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

Function test_empty

tests/fields/test_json.py:20–23  ·  view source on GitHub ↗

Test that creating without required JSON field raises IntegrityError.

(db)

Source from the content-addressed store, hash-verified

18
19@pytest.mark.asyncio
20async def test_empty(db):
21 """Test that creating without required JSON field raises IntegrityError."""
22 with pytest.raises(IntegrityError):
23 await testmodels.JSONFields.create()
24
25
26class MyPydanticModel(BaseModel):

Callers

nothing calls this directly

Calls 1

createMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…