Пример #1
0
 def test_set_status(self):
     t = Task()
     t.status = TaskStatus.DOING
     self.assertEqual(t.status, TaskStatus.DOING)
     t.status = TaskStatus.TODO
     self.assertEqual(t.status, TaskStatus.TODO)
     t.status = TaskStatus.DONE
     self.assertEqual(t.status, TaskStatus.DONE)
Пример #2
0
    def test_eq(self):
        t1 = Task()
        t1.content = "content one"
        t1.status = TaskStatus.TODO
        t1.id = 5

        t2 = Task()
        t2.content = "content one"
        t2.status = TaskStatus.DOING
        t2.id = 7

        self.assertNotEqual(t1, t2)
        t2.id = 5
        self.assertEqual(t1, t2)
Пример #3
0
 def test_get_status(self):
     t = Task()
     t.status = TaskStatus.DOING
     self.assertEqual(t.get_status(), TaskStatus.DOING)