MCPcopy
hub / github.com/jarun/buku / test_refreshdb

Function test_refreshdb

tests/test_bukuDb.py:1151–1160  ·  view source on GitHub ↗
(refreshdb_fixture, title_in, exp_res)

Source from the content-addressed store, hash-verified

1149 ],
1150)
1151def test_refreshdb(refreshdb_fixture, title_in, exp_res):
1152 bdb = refreshdb_fixture
1153 args = ["http://example.com"]
1154 if title_in:
1155 args.append(title_in)
1156 _add_rec(bdb, *args)
1157 with mock_fetch(title=exp_res):
1158 bdb.refreshdb(1, 1)
1159 from_db = bdb.get_rec_by_id(1)
1160 assert from_db[2] == exp_res, "from_db: {}".format(from_db)
1161
1162
1163@pytest.fixture

Callers

nothing calls this directly

Calls 4

_add_recFunction · 0.90
mock_fetchFunction · 0.90
refreshdbMethod · 0.80
get_rec_by_idMethod · 0.80

Tested by

no test coverage detected