Update tests to avoid duplicate front templates
This commit is contained in:
parent
60131eab23
commit
6fae0ea21f
@ -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)
|
||||||
|
@ -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)
|
||||||
|
@ -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)
|
||||||
|
@ -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!(
|
||||||
|
Loading…
Reference in New Issue
Block a user