From 1af59545bde221d5b95f91ff41a9d324c998bc83 Mon Sep 17 00:00:00 2001 From: Arthur Milchior Date: Fri, 17 Jul 2020 05:23:33 +0200 Subject: [PATCH] gn->deckn in test Obtained by ``` sed -i "s/\bg1\b/deck1/g" pylib/tests/*py qt/tests/*py sed -i "s/\bg2\b/deck2/g" pylib/tests/*py qt/tests/*py ``` --- pylib/tests/test_decks.py | 8 ++++---- pylib/tests/test_schedv1.py | 8 ++++---- pylib/tests/test_schedv2.py | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/pylib/tests/test_decks.py b/pylib/tests/test_decks.py index 005d46aa3..4dbe61551 100644 --- a/pylib/tests/test_decks.py +++ b/pylib/tests/test_decks.py @@ -46,15 +46,15 @@ def test_basic(): def test_remove(): col = getEmptyCol() # create a new col, and add a note/card to it - g1 = col.decks.id("g1") + deck1 = col.decks.id("deck1") note = col.newNote() note["Front"] = "1" - note.model()["did"] = g1 + note.model()["did"] = deck1 col.addNote(note) c = note.cards()[0] - assert c.did == g1 + assert c.did == deck1 assert col.cardCount() == 1 - col.decks.rem(g1) + col.decks.rem(deck1) assert col.cardCount() == 0 # if we try to get it, we get the default assert col.decks.name(c.did) == "[no deck]" diff --git a/pylib/tests/test_schedv1.py b/pylib/tests/test_schedv1.py index 8d8b7a32f..6586564b9 100644 --- a/pylib/tests/test_schedv1.py +++ b/pylib/tests/test_schedv1.py @@ -81,16 +81,16 @@ def test_new(): def test_newLimits(): col = getEmptyCol() # add some notes - g2 = col.decks.id("Default::foo") + deck2 = col.decks.id("Default::foo") for i in range(30): note = col.newNote() note["Front"] = str(i) if i > 4: - note.model()["did"] = g2 + note.model()["did"] = deck2 col.addNote(note) # give the child deck a different configuration c2 = col.decks.add_config_returning_id("new conf") - col.decks.setConf(col.decks.get(g2), c2) + col.decks.setConf(col.decks.get(deck2), c2) col.reset() # both confs have defaulted to a limit of 20 assert col.sched.newCount == 20 @@ -104,7 +104,7 @@ def test_newLimits(): col.reset() assert col.sched.newCount == 10 # if we limit child to 4, we should get 9 - conf2 = col.decks.confForDid(g2) + conf2 = col.decks.confForDid(deck2) conf2["new"]["perDay"] = 4 col.decks.save(conf2) col.reset() diff --git a/pylib/tests/test_schedv2.py b/pylib/tests/test_schedv2.py index 30c654d17..f41041860 100644 --- a/pylib/tests/test_schedv2.py +++ b/pylib/tests/test_schedv2.py @@ -82,16 +82,16 @@ def test_new(): def test_newLimits(): col = getEmptyCol() # add some notes - g2 = col.decks.id("Default::foo") + deck2 = col.decks.id("Default::foo") for i in range(30): note = col.newNote() note["Front"] = str(i) if i > 4: - note.model()["did"] = g2 + note.model()["did"] = deck2 col.addNote(note) # give the child deck a different configuration c2 = col.decks.add_config_returning_id("new conf") - col.decks.setConf(col.decks.get(g2), c2) + col.decks.setConf(col.decks.get(deck2), c2) col.reset() # both confs have defaulted to a limit of 20 assert col.sched.newCount == 20 @@ -105,7 +105,7 @@ def test_newLimits(): col.reset() assert col.sched.newCount == 10 # if we limit child to 4, we should get 9 - conf2 = col.decks.confForDid(g2) + conf2 = col.decks.confForDid(deck2) conf2["new"]["perDay"] = 4 col.decks.save(conf2) col.reset()