def test_fail_retry(self): t = Task(name='task', retry=3) t.fail() self.assertEqual(t.status, 'new') t.fail() self.assertEqual(t.status, 'new') t.fail() self.assertEqual(t.status, 'new') t.fail() self.assertEqual(t.status, 'failed')
def test_fail(self): t = Task(name='task') t.fail() self.assertEqual(t.status, 'failed')