Serialize more of the card object.

This commit is contained in:
David Snopek
2013-07-17 17:34:34 +01:00
parent 9deb84c6a6
commit 59f8171798
2 changed files with 40 additions and 5 deletions

View File

@@ -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()