mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
fix cloze unit test
This commit is contained in:
parent
17095ae1fb
commit
0ad8d82961
1 changed files with 3 additions and 2 deletions
|
@ -122,10 +122,11 @@ def test_cloze():
|
|||
d.models.setCurrent(d.models.byName("Cloze"))
|
||||
f = d.newNote()
|
||||
assert f.model()['name'] == "Cloze"
|
||||
# a cloze model with no clozes is empty
|
||||
# a cloze model with no clozes is not empty
|
||||
f['Text'] = u'nothing'
|
||||
assert d.addNote(f) == 0
|
||||
assert d.addNote(f)
|
||||
# try with one cloze
|
||||
f = d.newNote()
|
||||
f['Text'] = "hello {{c1::world}}"
|
||||
assert d.addNote(f) == 1
|
||||
assert "hello <span class=cloze>[...]</span>" in f.cards()[0].q()
|
||||
|
|
Loading…
Reference in a new issue