mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-09 11:04:26 +02:00
Test emptying db
This commit is contained in:
parent
535cff6f03
commit
3b438889a4
1 changed files with 9 additions and 0 deletions
|
|
@ -240,6 +240,15 @@ def test_remove_books(self): # {{{
|
|||
self.assertNotIn('My Series Two', set(c.fields['#series'].table.id_map.itervalues()))
|
||||
self.assertNotIn(item_id, c.fields['#series'].table.col_book_map)
|
||||
self.assertNotIn(1, c.fields['#series'].table.book_col_map)
|
||||
|
||||
# Test emptying the db
|
||||
cache.remove_books(cache.all_book_ids(), permanent=True)
|
||||
for f in ('authors', 'series', '#series', 'tags'):
|
||||
table = cache.fields[f].table
|
||||
self.assertFalse(table.id_map)
|
||||
self.assertFalse(table.book_col_map)
|
||||
self.assertFalse(table.col_book_map)
|
||||
|
||||
# }}}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue