MCPcopy
hub / github.com/tortoise/tortoise-orm / test_prevent_saving

Function test_prevent_saving

tests/test_validators.py:86–90  ·  view source on GitHub ↗
(db)

Source from the content-addressed store, hash-verified

84
85@pytest.mark.asyncio
86async def test_prevent_saving(db):
87 with pytest.raises(ValidationError):
88 await ValidatorModel.create(min_value_decimal=Decimal("0.9"))
89
90 assert await ValidatorModel.all().count() == 0
91
92
93@pytest.mark.asyncio

Callers

nothing calls this directly

Calls 3

countMethod · 0.80
createMethod · 0.45
allMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…