diff --git a/pylib/tests/test_schedv1.py b/pylib/tests/test_schedv1.py index a46261f83..819e8671d 100644 --- a/pylib/tests/test_schedv1.py +++ b/pylib/tests/test_schedv1.py @@ -3,7 +3,6 @@ import copy import time -from anki import hooks from anki.consts import * from anki.lang import without_unicode_isolation from anki.utils import intTime @@ -376,23 +375,6 @@ def test_reviews(): assert c.due == d.sched.today + c.ivl # factor should have been increased assert c.factor == 2650 - # leech handling - ################################################## - c = copy.copy(cardcopy) - c.lapses = 7 - c.flush() - # steup hook - hooked = [] - - def onLeech(card): - hooked.append(1) - - hooks.card_did_leech.append(onLeech) - d.sched.answerCard(c, 1) - assert hooked - assert c.queue == QUEUE_TYPE_SUSPENDED - c.load() - assert c.queue == QUEUE_TYPE_SUSPENDED def test_button_spacing(): diff --git a/pylib/tests/test_schedv2.py b/pylib/tests/test_schedv2.py index be805a83b..6aeca29a5 100644 --- a/pylib/tests/test_schedv2.py +++ b/pylib/tests/test_schedv2.py @@ -389,6 +389,9 @@ def test_reviews(): assert c.factor == 2650 # leech handling ################################################## + conf = d.decks.getConf(1) + conf["lapse"]["leechAction"] = LEECH_SUSPEND + d.decks.save(conf) c = copy.copy(cardcopy) c.lapses = 7 c.flush()