anki-connect/tests/test_export.py
Markus Reil 9ba5c08c96
Support apkg export (#143)
Support apkg export
2020-03-16 22:29:49 -07:00

22 lines
472 B
Python
Executable File

#!/usr/bin/env python
import os
import tempfile
import unittest
import util
class TestExport(unittest.TestCase):
def runTest(self):
fd, newname = tempfile.mkstemp(prefix="testexport", suffix=".apkg")
os.close(fd)
os.unlink(newname)
success = util.invoke('exportPackage', deck='Default', path=newname)
self.assertTrue(success)
self.assertTrue(os.path.exists(newname))
if __name__ == '__main__':
unittest.main()