def test_complete_task_message(self):
     section = Section("New section")
     task = Task("Tst", "27.04.2020")
     section.add_task(task)
     message = section.complete_task("Tst")
     expected = "Completed task Tst"
     self.assertEqual(message, expected)
 def test_complete_task(self):
     section = Section("New section")
     task = Task("Tst", "27.04.2020")
     section.add_task(task)
     section.complete_task("Tst")
     message = task.completed
     self.assertTrue(message)
 def test_add_task_already_added(self):
     section = Section("New section")
     task = Task("Tst", "27.04.2020")
     section.add_task(task)
     message = section.add_task(task)
     expected = "Task is already in the section New section"
     self.assertEqual(message, expected)
 def test_clean_section(self):
     section = Section("New section")
     task = Task("Tst", "27.04.2020")
     section.add_task(task)
     section.complete_task("Tst")
     message = section.clean_section()
     expected = "Cleared 1 tasks."
     self.assertEqual(message, expected)
from project.section import Section
from project.task import Task

task = Task("Make bed", "27/05/2020")
print(task.change_name("Go to University"))
print(task.change_due_date("28.05.2020"))
task.add_comment("Don't forget laptop")
print(task.edit_comment(0, "Don't forget laptop and notebook"))
print(task.details())
section = Section("Daily tasks")
print(section.add_task(task))
second_task = Task("Make bed", "27/05/2020")
section.add_task(second_task)
print(section.clean_section())
print(section.view_section())
 def test_add_task(self):
     section = Section("New section")
     task = Task("Tst", "27.04.2020")
     message = section.add_task(task)
     expected = "Task Name: Tst - Due Date: 27.04.2020 is added to the section"
     self.assertEqual(message, expected)