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

Function test_delete

tests/test_tinydb.py:652–664  ·  view source on GitHub ↗
(tmpdir)

Source from the content-addressed store, hash-verified

650
651
652def test_delete(tmpdir):
653 path = str(tmpdir.join('db.json'))
654
655 db = TinyDB(path, ensure_ascii=False)
656 q = Query()
657 db.insert({'network': {'id': '114', 'name': 'ok', 'rpc': 'dac',
658 'ticker': 'mkay'}})
659 assert db.search(q.network.id == '114') == [
660 {'network': {'id': '114', 'name': 'ok', 'rpc': 'dac',
661 'ticker': 'mkay'}}
662 ]
663 db.remove(q.network.id == '114')
664 assert db.search(q.network.id == '114') == []
665
666
667def test_insert_multiple_with_single_dict(db: TinyDB):

Callers

nothing calls this directly

Calls 5

TinyDBClass · 0.90
QueryClass · 0.90
insertMethod · 0.80
removeMethod · 0.80
searchMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…