Implemented a way to re-import from an .apkg file and update the existing notes.

This commit is contained in:
David Snopek
2013-07-30 17:10:49 +01:00
parent 442037c211
commit d6c1ae164c
3 changed files with 187 additions and 1 deletions

View File

@@ -129,6 +129,7 @@ class CollectionTestBase(unittest.TestCase):
shutil.rmtree(self.temp_dir)
self.mock_app.reset_mock()
# TODO: refactor into some kind of utility
def add_note(self, data):
from anki.notes import Note
@@ -143,6 +144,7 @@ class CollectionTestBase(unittest.TestCase):
self.collection.addNote(note)
# TODO: refactor into a parent class
def add_default_note(self, count=1):
data = {
'model': 'Basic',