(self)
| 53 | t.call_after.assert_called_with(0.3, sys.exit, 10) |
| 54 | |
| 55 | def test_ensure_started_not_started(self): |
| 56 | t = timer2.Timer() |
| 57 | t.running = True |
| 58 | t.start = Mock() |
| 59 | t.ensure_started() |
| 60 | t.start.assert_not_called() |
| 61 | t.running = False |
| 62 | t.on_start = Mock() |
| 63 | t.ensure_started() |
| 64 | t.on_start.assert_called_with(t) |
| 65 | t.start.assert_called_with() |
| 66 | |
| 67 | @patch('celery.utils.timer2.sleep') |
| 68 | @patch('os._exit') # To ensure the test fails gracefully |
nothing calls this directly
no test coverage detected