fix unit tests

This commit is contained in:
Damien Elmes 2012-04-17 22:23:44 +09:00
parent 1b6cf2bef8
commit 3ab91c600b
2 changed files with 2 additions and 2 deletions

View file

@ -60,7 +60,7 @@ def test_remove():
c.load() c.load()
assert c.did == g1 assert c.did == g1
# but if we try to get it, we get the default # but if we try to get it, we get the default
assert deck.decks.name(c.did) == "Default" assert deck.decks.name(c.did) == "[no deck]"
# let's create another deck and explicitly set the card to it # let's create another deck and explicitly set the card to it
g2 = deck.decks.id("g2") g2 = deck.decks.id("g2")
c.did = g2; c.flush() c.did = g2; c.flush()

View file

@ -45,7 +45,7 @@ def test_anki2():
"select count() from cards where nid not in (select id from notes)") "select count() from cards where nid not in (select id from notes)")
assert not dst.db.scalar( assert not dst.db.scalar(
"select count() from revlog where cid not in (select id from cards)") "select count() from revlog where cid not in (select id from cards)")
assert dst.fixIntegrity().startswith("Database rebuilt") assert dst.fixIntegrity()[0].startswith("Database rebuilt")
check() check()
# importing should be idempotent # importing should be idempotent
imp.run() imp.run()