From 0ad8d829615045201d461f614e04dc3202167364 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Fri, 25 May 2012 11:06:31 +0900 Subject: [PATCH] fix cloze unit test --- tests/test_models.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/test_models.py b/tests/test_models.py index 56d673935..5bd080037 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -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 [...]" in f.cards()[0].q()