From c6e78e6f21aeb7daa7626e1a46ef3604db74ba1e Mon Sep 17 00:00:00 2001 From: RumovZ Date: Fri, 28 May 2021 10:08:55 +0200 Subject: [PATCH] Adjusts tests to pass new template checks --- pylib/tests/test_collection.py | 4 ---- pylib/tests/test_models.py | 3 ++- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/pylib/tests/test_collection.py b/pylib/tests/test_collection.py index 95b941708..c3a0225c2 100644 --- a/pylib/tests/test_collection.py +++ b/pylib/tests/test_collection.py @@ -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(): diff --git a/pylib/tests/test_models.py b/pylib/tests/test_models.py index a5f947d88..a1bc0d4be 100644 --- a/pylib/tests/test_models.py +++ b/pylib/tests/test_models.py @@ -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", []]