work on tests
This commit is contained in:
parent
8b78a4d2f7
commit
acad72732f
3
test.sh
Executable file
3
test.sh
Executable file
@ -0,0 +1,3 @@
|
||||
#!/usr/bin/sh
|
||||
|
||||
python -m unittest discover -v tests
|
@ -1,16 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import unittest
|
||||
from unittest import TestCase
|
||||
from util import callAnkiConnectEndpoint
|
||||
|
||||
class TestDeckNames(TestCase):
|
||||
|
||||
def test_deckNames(self):
|
||||
response = callAnkiConnectEndpoint({'action': 'deckNames'})
|
||||
self.assertEqual(['Default'], response)
|
||||
|
||||
class TestGetDeckConfig(TestCase):
|
||||
|
||||
def test_getDeckConfig(self):
|
||||
response = callAnkiConnectEndpoint({'action': 'getDeckConfig', 'params': {'deck': 'Default'}})
|
||||
self.assertDictContainsSubset({'name': 'Default', 'replayq': True}, response)
|
@ -4,21 +4,24 @@ import unittest
|
||||
import util
|
||||
|
||||
|
||||
class TestMisc(unittest.TestCase):
|
||||
def test_version(self):
|
||||
class TestVersion(unittest.TestCase):
|
||||
def runTest(self):
|
||||
result = util.invoke('version')
|
||||
self.assertEqual(result, 5)
|
||||
|
||||
|
||||
def test_upgrade(self):
|
||||
class TestUpgrade(unittest.TestCase):
|
||||
def runTest(self):
|
||||
util.invoke('upgrade')
|
||||
|
||||
|
||||
def test_sync(self):
|
||||
class TestSync(unittest.TestCase):
|
||||
def runTest(self):
|
||||
util.invoke('sync')
|
||||
|
||||
|
||||
def test_multi(self):
|
||||
class TestMulti(unittest.TestCase):
|
||||
def runTest(self):
|
||||
result = util.invoke(
|
||||
'multi', {
|
||||
'actions': [
|
||||
|
Loading…
Reference in New Issue
Block a user