test that if two decks differs only by case, they are renamed

This commit is contained in:
Arthur Milchior 2019-11-13 17:00:28 +01:00
parent 6aacd7782f
commit 9a40f29bce

View File

@ -158,3 +158,14 @@ def test_renameForDragAndDrop():
# '' is a convenient alias for the top level DID
d.decks.renameForDragAndDrop(hsk_did, '')
assert deckNames() == [ 'Chinese', 'HSK', 'Languages' ]
def test_check():
d = getEmptyCol()
foo_did = d.decks.id("foo")
FOO_did = d.decks.id("bar")
FOO = d.decks.byName("bar")
FOO["name"] = "FOO"
d.decks.save(FOO)
d.decks._checkDeckTree()
assert "foo" not in d.decks.allNames() or "FOO" not in d.decks.allNames()