def test_add(self):
    rep = tasks.Repository()
    task = tasks.Task(100, 'new task')
    rep.add(task)
    l = rep.list()
    self.assertEqual(len(l), 3)
    self.assertEqual(l[2].id, 3)
    self.assertEqual(l[2].text, 'new task')
    self.assertEqual(l[2].done, False)
def test_add(self):
    rep = tasks.Repository()
    task = tasks.Task(100, 'new task')
    rep.add(task)
    l = rep.list()
    self.assertEqual(len(l), 3)
    self.assertEqual(l[2].id, 3)
    self.assertEqual(l[2].text, 'new task')
    self.assertEqual(l[2].done, False)