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

Function test_unique_fail

tests/fields/test_json.py:329–332  ·  view source on GitHub ↗

Test that JSONField cannot be unique.

()

Source from the content-addressed store, hash-verified

327
328
329def test_unique_fail():
330 """Test that JSONField cannot be unique."""
331 with pytest.raises(ConfigurationError, match="can't be indexed"):
332 JSONField(unique=True)
333
334
335def test_index_fail():

Callers

nothing calls this directly

Calls 1

JSONFieldClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…