MCPcopy
hub / github.com/msiemens/tinydb / test_insert_with_duplicate_doc_id

Function test_insert_with_duplicate_doc_id

tests/test_tinydb.py:60–65  ·  view source on GitHub ↗
(db: TinyDB)

Source from the content-addressed store, hash-verified

58
59
60def test_insert_with_duplicate_doc_id(db: TinyDB):
61 db.drop_tables()
62 assert db.insert({'int': 1, 'char': 'a'}) == 1
63
64 with pytest.raises(ValueError):
65 db.insert(Document({'int': 1, 'char': 'a'}, 1))
66
67
68def test_insert_multiple(db: TinyDB):

Callers

nothing calls this directly

Calls 3

DocumentClass · 0.90
drop_tablesMethod · 0.80
insertMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…