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