(db: TinyDB)
| 28 | |
| 29 | |
| 30 | def test_insert(db: TinyDB): |
| 31 | db.drop_tables() |
| 32 | db.insert({'int': 1, 'char': 'a'}) |
| 33 | |
| 34 | assert db.count(where('int') == 1) == 1 |
| 35 | |
| 36 | db.drop_tables() |
| 37 | |
| 38 | db.insert({'int': 1, 'char': 'a'}) |
| 39 | db.insert({'int': 1, 'char': 'b'}) |
| 40 | db.insert({'int': 1, 'char': 'c'}) |
| 41 | |
| 42 | assert db.count(where('int') == 1) == 3 |
| 43 | assert db.count(where('char') == 'a') == 1 |
| 44 | |
| 45 | |
| 46 | def test_insert_ids(db: TinyDB): |
nothing calls this directly
no test coverage detected
searching dependent graphs…