mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 14:04:12 +02:00
Fix get_metadata() test
This commit is contained in:
parent
8402205d11
commit
5b08c1ed60
1 changed files with 4 additions and 1 deletions
|
|
@ -7,8 +7,8 @@
|
|||
__copyright__ = '2011, Kovid Goyal <kovid@kovidgoyal.net>'
|
||||
__docformat__ = 'restructuredtext en'
|
||||
|
||||
|
||||
import unittest, os, shutil
|
||||
from future_builtins import map
|
||||
|
||||
class BaseTest(unittest.TestCase):
|
||||
|
||||
|
|
@ -39,7 +39,10 @@ def compare_metadata(self, mi1, mi2):
|
|||
'ondevice_col', 'last_modified'}.union(allfk1)
|
||||
for attr in all_keys:
|
||||
if attr == 'user_metadata': continue
|
||||
if attr == 'format_metadata': continue # TODO: Not implemented yet
|
||||
attr1, attr2 = getattr(mi1, attr), getattr(mi2, attr)
|
||||
if attr == 'formats':
|
||||
attr1, attr2 = map(lambda x:tuple(x) if x else (), (attr1, attr2))
|
||||
self.assertEqual(attr1, attr2,
|
||||
'%s not the same: %r != %r'%(attr, attr1, attr2))
|
||||
if attr.startswith('#'):
|
||||
|
|
|
|||
Loading…
Reference in a new issue