def delete_todo(): deleteValueFromListInDict(request.form["todoHeader"], request.form["taskToDelete"], todoDict) return redirect("/fillFormRender")
def test_deleteValueFromListInDict_givenEmptyKey(): with pytest.raises(Exception): deleteValueFromListInDict("", "task1", TEST_DIC)
def test_deleteValueFromListInDict_withoutExistingKey(): TEST_DIC = copy.deepcopy(DIC) assert not deleteValueFromListInDict("list6", "task1", TEST_DIC)
def test_deleteValueFromListInDict_givenEmptyDic(): assert not deleteValueFromListInDict("list1", "task1", EMPTY_TEST_DIC)
def test_deleteValueFromListInDict_givenExistingKeyAndWithoutExistingValue( data): TEST_DIC = copy.deepcopy(DIC) assert not deleteValueFromListInDict("list1", data, TEST_DIC)