From 7b217c63feb606286846d6b2f22a67c8b9033305 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Mon, 27 May 2013 14:30:23 +0900 Subject: [PATCH] fix unit test --- tests/test_importing.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test_importing.py b/tests/test_importing.py index 46c91a0bd..075ad86d9 100644 --- a/tests/test_importing.py +++ b/tests/test_importing.py @@ -179,15 +179,18 @@ def test_anki2_diffmodels(): # import the 1 card version of the model tmp = getUpgradeDeckPath("diffmodels2-1.apkg") imp = AnkiPackageImporter(dst, tmp) + imp.dupeOnSchemaChange = True imp.run() before = dst.noteCount() # repeating the process should do nothing imp = AnkiPackageImporter(dst, tmp) + imp.dupeOnSchemaChange = True imp.run() assert before == dst.noteCount() # then the 2 card version tmp = getUpgradeDeckPath("diffmodels2-2.apkg") imp = AnkiPackageImporter(dst, tmp) + imp.dupeOnSchemaChange = True imp.run() after = dst.noteCount() # as the model schemas differ, should have been imported as new model @@ -196,6 +199,7 @@ def test_anki2_diffmodels(): assert dst.cardCount() == 3 # repeating the process should do nothing imp = AnkiPackageImporter(dst, tmp) + imp.dupeOnSchemaChange = True imp.run() after = dst.noteCount() assert after == before + 1