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

Function test_insert_with_doc_id

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

Source from the content-addressed store, hash-verified

50
51
52def test_insert_with_doc_id(db: TinyDB):
53 db.drop_tables()
54 assert db.insert({'int': 1, 'char': 'a'}) == 1
55 assert db.insert(Document({'int': 1, 'char': 'a'}, 12)) == 12
56 assert db.insert(Document({'int': 1, 'char': 'a'}, 77)) == 77
57 assert db.insert({'int': 1, 'char': 'a'}) == 78
58
59
60def test_insert_with_duplicate_doc_id(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…