From d6dd1849cf645b4ecc506b569083176ba06ed259 Mon Sep 17 00:00:00 2001 From: Arthur Milchior Date: Thu, 15 Oct 2020 08:22:23 +0200 Subject: [PATCH] NF: uses consts and update comment according to code --- pylib/tests/test_schedv1.py | 8 ++++---- pylib/tests/test_schedv2.py | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pylib/tests/test_schedv1.py b/pylib/tests/test_schedv1.py index fe5452cb1..ed9ca9ba3 100644 --- a/pylib/tests/test_schedv1.py +++ b/pylib/tests/test_schedv1.py @@ -135,8 +135,8 @@ def test_learn(): note["Front"] = "one" note["Back"] = "two" col.addNote(note) - # set as a learn card and rebuild queues - col.db.execute("update cards set queue=0, type=0") + # set as a new card and rebuild queues + col.db.execute(f"update cards set queue={QUEUE_TYPE_NEW}, type={CARD_TYPE_NEW}") col.reset() # sched.getCard should return it, since it's due in the past c = col.sched.getCard() @@ -215,8 +215,8 @@ def test_learn_collapsed(): note = col.newNote() note["Front"] = "2" col.addNote(note) - # set as a learn card and rebuild queues - col.db.execute("update cards set queue=0, type=0") + # set as a new card and rebuild queues + col.db.execute(f"update cards set queue={QUEUE_TYPE_NEW}, type={CARD_TYPE_NEW}") col.reset() # should get '1' first c = col.sched.getCard() diff --git a/pylib/tests/test_schedv2.py b/pylib/tests/test_schedv2.py index f09a63094..9417ae9aa 100644 --- a/pylib/tests/test_schedv2.py +++ b/pylib/tests/test_schedv2.py @@ -137,8 +137,8 @@ def test_learn(): note["Front"] = "one" note["Back"] = "two" col.addNote(note) - # set as a learn card and rebuild queues - col.db.execute("update cards set queue=0, type=0") + # set as a new card and rebuild queues + col.db.execute(f"update cards set queue={QUEUE_TYPE_NEW}, type={CARD_TYPE_NEW}") col.reset() # sched.getCard should return it, since it's due in the past c = col.sched.getCard() @@ -252,8 +252,8 @@ def test_learn_collapsed(): note = col.newNote() note["Front"] = "2" col.addNote(note) - # set as a learn card and rebuild queues - col.db.execute("update cards set queue=0, type=0") + # set as a new card and rebuild queues + col.db.execute(f"update cards set queue={QUEUE_TYPE_NEW}, type={CARD_TYPE_NEW}") col.reset() # should get '1' first c = col.sched.getCard()