Test all_annotations_for_book()

This commit is contained in:
Kovid Goyal 2021-05-24 08:49:24 +05:30
parent 3106b4eb4b
commit bf119f0cf1
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -791,6 +791,7 @@ class WritingTest(BaseTest):
cache.set_annotations_for_book(1, 'moo', annot_list)
amap = cache.annotations_map_for_book(1, 'moo')
self.assertEqual(3, len(cache.all_annotations_for_book(1)))
self.assertEqual([x[0] for x in annot_list], map_as_list(amap))
self.assertFalse(cache.dirtied_cache)
cache.check_dirtied_annotations()