Update tests to avoid duplicate front templates

This commit is contained in:
RumovZ 2021-05-25 21:58:12 +02:00
parent 60131eab23
commit 6fae0ea21f
4 changed files with 4 additions and 4 deletions

View File

@ -45,7 +45,7 @@ def test_genrem():
mm = col.models mm = col.models
# adding a new template should automatically create cards # adding a new template should automatically create cards
t = mm.newTemplate("rev") t = mm.newTemplate("rev")
t["qfmt"] = "{{Front}}" t["qfmt"] = "{{Front}}2"
t["afmt"] = "" t["afmt"] = ""
mm.addTemplate(m, t) mm.addTemplate(m, t)
mm.save(m, templates=True) mm.save(m, templates=True)

View File

@ -811,7 +811,7 @@ def test_ordcycle():
t["afmt"] = "{{Front}}" t["afmt"] = "{{Front}}"
mm.addTemplate(m, t) mm.addTemplate(m, t)
t = mm.newTemplate("f2") t = mm.newTemplate("f2")
t["qfmt"] = "{{Front}}" t["qfmt"] = "{{Front}}2"
t["afmt"] = "{{Back}}" t["afmt"] = "{{Back}}"
mm.addTemplate(m, t) mm.addTemplate(m, t)
mm.save(m) mm.save(m)

View File

@ -885,7 +885,7 @@ def test_ordcycle():
t["afmt"] = "{{Front}}" t["afmt"] = "{{Front}}"
mm.addTemplate(m, t) mm.addTemplate(m, t)
t = mm.newTemplate("f2") t = mm.newTemplate("f2")
t["qfmt"] = "{{Front}}" t["qfmt"] = "{{Front}}2"
t["afmt"] = "{{Back}}" t["afmt"] = "{{Back}}"
mm.addTemplate(m, t) mm.addTemplate(m, t)
mm.save(m) mm.save(m)

View File

@ -311,7 +311,7 @@ mod test {
); );
// add an extra card template // add an extra card template
nt.add_template("card 2", "{{Front}}", ""); nt.add_template("card 2", "{{Front}}2", "");
col.update_notetype(&mut nt)?; col.update_notetype(&mut nt)?;
assert_eq!( assert_eq!(