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

Function test_unique_fail

tests/fields/test_text.py:39–47  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

37
38
39def test_unique_fail():
40 msg = "TextField can't be indexed, consider CharField"
41 with pytest.raises(ConfigurationError, match=msg):
42 with pytest.warns(
43 DeprecationWarning, match="`index` is deprecated, please use `db_index` instead"
44 ):
45 TextField(index=True)
46 with pytest.raises(ConfigurationError, match=msg):
47 TextField(db_index=True)
48
49
50def test_index_fail():

Callers

nothing calls this directly

Calls 1

TextFieldClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…