Serialize more of the card object.
This commit is contained in:
@@ -323,12 +323,16 @@ class DeckHandlerTest(CollectionTestBase):
|
||||
}
|
||||
self.add_note(note)
|
||||
|
||||
# get the id for the one card on this collection
|
||||
# get the id for the one card and note on this collection
|
||||
note_id = self.collection.findNotes('')[0]
|
||||
card_id = self.collection.findCards('')[0]
|
||||
|
||||
self.collection.sched.reset()
|
||||
ret = self.execute('next_card', {})
|
||||
self.assertEqual(ret['id'], card_id)
|
||||
self.assertEqual(ret['nid'], note_id)
|
||||
self.assertEqual(ret['question'], '<style>.card {\n font-family: arial;\n font-size: 20px;\n text-align: center;\n color: black;\n background-color: white;\n}\n</style>The front')
|
||||
self.assertEqual(ret['answer'], '<style>.card {\n font-family: arial;\n font-size: 20px;\n text-align: center;\n color: black;\n background-color: white;\n}\n</style>The front\n\n<hr id=answer>\n\nThe back')
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
||||
Reference in New Issue
Block a user