mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-04-26 07:23:51 +02:00
...
This commit is contained in:
parent
937f475a9e
commit
a8dba2f020
1 changed files with 2 additions and 0 deletions
|
|
@ -183,6 +183,7 @@ def test_legacy_adding_books(self): # {{{
|
|||
f.write(b'tttttt')
|
||||
f.seek(0)
|
||||
bid = legacy.add_catalog(f.name, 'My Catalog')
|
||||
self.assertEqual(old.add_catalog(f.name, 'My Catalog'), bid)
|
||||
cache = legacy.new_api
|
||||
self.assertEqual(cache.formats(bid), ('TXT',))
|
||||
self.assertEqual(cache.field_for('title', bid), 'My Catalog')
|
||||
|
|
@ -190,6 +191,7 @@ def test_legacy_adding_books(self): # {{{
|
|||
self.assertEqual(cache.field_for('tags', bid), (_('Catalog'),))
|
||||
self.assertTrue(bid < legacy.add_catalog(f.name, 'Something else'))
|
||||
self.assertEqual(legacy.add_catalog(f.name, 'My Catalog'), bid)
|
||||
self.assertEqual(old.add_catalog(f.name, 'My Catalog'), bid)
|
||||
|
||||
bid = legacy.add_news(f.name, {'title':'Events', 'add_title_tag':True, 'custom_tags':('one', 'two')})
|
||||
self.assertEqual(cache.formats(bid), ('TXT',))
|
||||
|
|
|
|||
Loading…
Reference in a new issue