mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 06:52:21 -04:00
Adjusts tests to pass new template checks
This commit is contained in:
parent
2e923db6bd
commit
c6e78e6f21
2 changed files with 2 additions and 5 deletions
|
@ -143,10 +143,6 @@ def test_furigana():
|
|||
n["Front"] = "foo[sound:abc.mp3]"
|
||||
n.flush()
|
||||
assert "anki:play" in c.q(reload=True)
|
||||
# it shouldn't throw an error while people are editing
|
||||
m["tmpls"][0]["qfmt"] = "{{kana:}}"
|
||||
mm.save(m)
|
||||
c.q(reload=True)
|
||||
|
||||
|
||||
def test_translate():
|
||||
|
|
|
@ -115,6 +115,7 @@ def test_templates():
|
|||
assert stripHTML(c.q()) == "1"
|
||||
# it shouldn't be possible to orphan notes by removing templates
|
||||
t = mm.newTemplate("template name")
|
||||
t["qfmt"] = "{{Front}}2"
|
||||
mm.addTemplate(m, t)
|
||||
col.models.remTemplate(m, m["tmpls"][0])
|
||||
assert (
|
||||
|
@ -391,7 +392,7 @@ def test_req():
|
|||
mm.save(opt, templates=True)
|
||||
assert opt["req"][1] == [1, "any", [1, 2]]
|
||||
# testing None
|
||||
opt["tmpls"][1]["qfmt"] = "{{^Add Reverse}}{{/Add Reverse}}"
|
||||
opt["tmpls"][1]["qfmt"] = "{{^Add Reverse}}{{Tags}}{{/Add Reverse}}"
|
||||
mm.save(opt, templates=True)
|
||||
assert opt["req"][1] == [1, "none", []]
|
||||
|
||||
|
|
Loading…
Reference in a new issue