def test_write_file_tasks(): fichier = open("liste_taches.txt", "w") task_manager = TaskManager() tache1 = task_manager.parse_add("", "", "") fichier.write(tache1.name) fichier.write(" ") fichier.write(tache1.numero) fichier.write(" ") fichier.write(tache1.statut) fichier.write(" ") fichier.close()
def test_parse_add(): command = "+ first task" numero = 1 statut = "a faire" task_manager = TaskManager() action = task_manager.parse_add(command,numero, statut) assert action.name == "add" assert action.description == "first task" assert action.statut == "a faire"
def test_repository(): task_manager = TaskManager() tache1 = task_manager.parse_add("tache1", "1", "A faire") tasks = [tache1] assert task_manager.tasks == []