anki/pylib/tests/test_template.py

19 lines
469 B
Python
Raw Normal View History

2021-04-13 10:45:05 +02:00
# Copyright: Ankitects Pty Ltd and contributors
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
from tests.shared import getEmptyCol
def test_deferred_frontside():
col = getEmptyCol()
m = col.models.current()
m["tmpls"][0]["qfmt"] = "{{custom:Front}}"
col.models.save(m)
note = col.newNote()
note["Front"] = "xxtest"
note["Back"] = ""
col.addNote(note)
2021-06-27 04:12:23 +02:00
assert "xxtest" in note.cards()[0].answer()