mirror of
https://github.com/ankitects/anki.git
synced 2025-11-06 20:57:13 -05:00
ntype -> note
This commit is contained in:
parent
2ba5f80cf1
commit
2f75e99671
2 changed files with 4 additions and 4 deletions
|
|
@ -349,7 +349,7 @@ n.mid in %s and n.id %s in %s""" % (
|
||||||
elif token['value'].startswith("is:"):
|
elif token['value'].startswith("is:"):
|
||||||
token['value'] = token['value'][3:].lower()
|
token['value'] = token['value'][3:].lower()
|
||||||
type = SEARCH_TYPE
|
type = SEARCH_TYPE
|
||||||
elif token['value'].startswith("ntype:"):
|
elif token['value'].startswith("note:"):
|
||||||
token['value'] = token['value'][6:].lower()
|
token['value'] = token['value'][6:].lower()
|
||||||
type = SEARCH_MODEL
|
type = SEARCH_MODEL
|
||||||
elif token['value'].startswith("deck:"):
|
elif token['value'].startswith("deck:"):
|
||||||
|
|
|
||||||
|
|
@ -101,9 +101,9 @@ def test_findCards():
|
||||||
deck.conf['sortBackwards'] = True
|
deck.conf['sortBackwards'] = True
|
||||||
assert deck.findCards("")[0] in latestCardIds
|
assert deck.findCards("")[0] in latestCardIds
|
||||||
# model
|
# model
|
||||||
assert len(deck.findCards("ntype:basic")) == 5
|
assert len(deck.findCards("note:basic")) == 5
|
||||||
assert len(deck.findCards("-ntype:basic")) == 0
|
assert len(deck.findCards("-note:basic")) == 0
|
||||||
assert len(deck.findCards("-ntype:foo")) == 5
|
assert len(deck.findCards("-note:foo")) == 5
|
||||||
# deck
|
# deck
|
||||||
assert len(deck.findCards("deck:default")) == 5
|
assert len(deck.findCards("deck:default")) == 5
|
||||||
assert len(deck.findCards("-deck:default")) == 0
|
assert len(deck.findCards("-deck:default")) == 0
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue