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

Function test_exportdb_single_rec

tests/test_bukuDb.py:1872–1880  ·  view source on GitHub ↗
(bukuDb, tmpdir)

Source from the content-addressed store, hash-verified

1870
1871
1872def test_exportdb_single_rec(bukuDb, tmpdir):
1873 f1 = NamedTemporaryFile(delete=False)
1874 f1.close()
1875 db = bukuDb(dbfile=f1.name)
1876 _add_rec(db, "http://example.com")
1877 exp_file = tmpdir.join("export")
1878 db.exportdb(exp_file.strpath)
1879 with open(exp_file.strpath, encoding="utf8", errors="surrogateescape") as f2:
1880 assert f2.read()
1881
1882
1883def test_exportdb_to_db(bukuDb):

Callers

nothing calls this directly

Calls 4

_add_recFunction · 0.90
bukuDbFunction · 0.85
closeMethod · 0.80
exportdbMethod · 0.80

Tested by

no test coverage detected