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
|
|
|
|
|
2020-01-12 06:15:46 +01:00
|
|
|
from tests.shared import getEmptyCol
|
2019-12-22 04:28:29 +01:00
|
|
|
|
|
|
|
|
2020-01-12 06:15:46 +01:00
|
|
|
def test_deferred_frontside():
|
2020-07-17 05:21:12 +02:00
|
|
|
col = getEmptyCol()
|
|
|
|
m = col.models.current()
|
2020-01-12 06:15:46 +01:00
|
|
|
m["tmpls"][0]["qfmt"] = "{{custom:Front}}"
|
2020-07-17 05:21:12 +02:00
|
|
|
col.models.save(m)
|
2020-01-12 06:15:46 +01:00
|
|
|
|
2020-07-17 05:21:12 +02:00
|
|
|
note = col.newNote()
|
2020-07-17 05:18:09 +02:00
|
|
|
note["Front"] = "xxtest"
|
|
|
|
note["Back"] = ""
|
2020-07-17 05:21:12 +02:00
|
|
|
col.addNote(note)
|
2020-01-12 06:15:46 +01:00
|
|
|
|
2021-06-27 04:12:23 +02:00
|
|
|
assert "xxtest" in note.cards()[0].answer()
|