mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 08:46:37 -04:00
less terse card state searches
This commit is contained in:
parent
67e4f0d1cc
commit
8c1266ab2a
2 changed files with 4 additions and 4 deletions
|
@ -131,8 +131,8 @@ and c.nid=n.id %s""" % (q, order)
|
|||
|
||||
def _findCardState(self, val, neg):
|
||||
cond = None
|
||||
if val in ("rev", "new", "lrn"):
|
||||
if val == "rev":
|
||||
if val in ("review", "new", "learn"):
|
||||
if val == "review":
|
||||
n = 2
|
||||
elif val == "new":
|
||||
n = 0
|
||||
|
|
|
@ -58,9 +58,9 @@ def test_findCards():
|
|||
# card states
|
||||
c = f.cards()[0]
|
||||
c.type = 2
|
||||
assert deck.findCards("is:rev") == []
|
||||
assert deck.findCards("is:review") == []
|
||||
c.flush()
|
||||
assert deck.findCards("is:rev") == [c.id]
|
||||
assert deck.findCards("is:review") == [c.id]
|
||||
assert deck.findCards("is:due") == []
|
||||
c.due = 0; c.queue = 2
|
||||
c.flush()
|
||||
|
|
Loading…
Reference in a new issue