mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 18:54:09 -04:00
Test emptying db
This commit is contained in:
parent
535cff6f03
commit
3b438889a4
@ -240,6 +240,15 @@ class AddRemoveTest(BaseTest):
|
||||
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…
x
Reference in New Issue
Block a user