mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 18:24:30 -04:00
...
This commit is contained in:
parent
442d0ab267
commit
fe27e08a83
@ -38,7 +38,7 @@ class ReadingTest(unittest.TestCase):
|
|||||||
def tearDown(self):
|
def tearDown(self):
|
||||||
shutil.rmtree(self.library_path)
|
shutil.rmtree(self.library_path)
|
||||||
|
|
||||||
def test_read(self):
|
def test_read(self): # {{{
|
||||||
cache = init_cache(self.library_path)
|
cache = init_cache(self.library_path)
|
||||||
tests = {
|
tests = {
|
||||||
2 : {
|
2 : {
|
||||||
@ -48,7 +48,7 @@ class ReadingTest(unittest.TestCase):
|
|||||||
'author_sort': 'One, Author',
|
'author_sort': 'One, Author',
|
||||||
'series' : 'Series One',
|
'series' : 'Series One',
|
||||||
'series_index': 1.0,
|
'series_index': 1.0,
|
||||||
'tags':('Tag One',),
|
'tags':('Tag Two', 'Tag One'),
|
||||||
'rating': 4.0,
|
'rating': 4.0,
|
||||||
'identifiers': {'test':'one'},
|
'identifiers': {'test':'one'},
|
||||||
'timestamp': datetime.datetime(2011, 9, 5, 15, 6,
|
'timestamp': datetime.datetime(2011, 9, 5, 15, 6,
|
||||||
@ -103,7 +103,7 @@ class ReadingTest(unittest.TestCase):
|
|||||||
for field, expected_val in test.iteritems():
|
for field, expected_val in test.iteritems():
|
||||||
self.assertEqual(expected_val,
|
self.assertEqual(expected_val,
|
||||||
cache.field_for(field, book_id))
|
cache.field_for(field, book_id))
|
||||||
break
|
# }}}
|
||||||
|
|
||||||
def tests():
|
def tests():
|
||||||
return unittest.TestLoader().loadTestsFromTestCase(ReadingTest)
|
return unittest.TestLoader().loadTestsFromTestCase(ReadingTest)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user