fix changeDeck tests
This commit is contained in:
parent
968341a66f
commit
cd11abfc2a
@ -16,34 +16,29 @@ class TestDecks(unittest.TestCase):
|
|||||||
self.assertEqual(result['Default'], 1)
|
self.assertEqual(result['Default'], 1)
|
||||||
|
|
||||||
# createDeck
|
# createDeck
|
||||||
util.invoke('createDeck', deck='test')
|
util.invoke('createDeck', deck='test1')
|
||||||
|
|
||||||
# deckNames (part 2)
|
# deckNames (part 2)
|
||||||
deckNames = util.invoke('deckNames')
|
deckNames = util.invoke('deckNames')
|
||||||
self.assertIn('test', deckNames)
|
self.assertIn('test1', deckNames)
|
||||||
|
|
||||||
# deleteDecks
|
# changeDeck
|
||||||
util.invoke('deleteDecks', decks=['test'], cardsToo=True)
|
note = {'deckName': 'test1', 'modelName': 'Basic', 'fields': {'Front': 'front', 'Back': 'back'}, 'tags': ['tag']}
|
||||||
|
noteId = util.invoke('addNote', note=note)
|
||||||
|
cardIds = util.invoke('findCards', query='deck:test1')
|
||||||
|
util.invoke('changeDeck', cards=cardIds, deck='test2')
|
||||||
|
|
||||||
# deckNames (part 3)
|
# deckNames (part 3)
|
||||||
deckNames = util.invoke('deckNames')
|
deckNames = util.invoke('deckNames')
|
||||||
self.assertNotIn('test', deckNames)
|
self.assertIn('test2', deckNames)
|
||||||
|
|
||||||
# changeDeck
|
# deleteDecks
|
||||||
# note = {'deckName': 'Default', 'modelName': 'Basic', 'fields': {'Front': 'front', 'Back': 'back'}, 'tags': ['tag']}
|
util.invoke('deleteDecks', decks=['test1', 'test2'], cardsToo=True)
|
||||||
# noteId = util.invoke('addNote', note=note)
|
|
||||||
# util.invoke('changeDeck', cards=[noteId], deck='test')
|
|
||||||
|
|
||||||
# deckNames (part 4)
|
# deckNames (part 4)
|
||||||
# deckNames = util.invoke('deckNames')
|
deckNames = util.invoke('deckNames')
|
||||||
# self.assertIn('test', deckNames)
|
self.assertNotIn('test1', deckNames)
|
||||||
|
self.assertNotIn('test2', deckNames)
|
||||||
# deleteDecks (part 2)
|
|
||||||
# util.invoke('deleteDecks', decks=['test'], cardsToo=True)
|
|
||||||
|
|
||||||
# deckNames (part 5)
|
|
||||||
# deckNames = util.invoke('deckNames')
|
|
||||||
# self.assertNotIn('test', deckNames)
|
|
||||||
|
|
||||||
# getDeckConfig
|
# getDeckConfig
|
||||||
deckConfig = util.invoke('getDeckConfig', deck='Default')
|
deckConfig = util.invoke('getDeckConfig', deck='Default')
|
||||||
|
Loading…
Reference in New Issue
Block a user