@mock.patch('time.sleep')
    @mock.patch('google.appengine.api.taskqueue.Queue', autospec=True)
    def test_start_hits_transient_error(self, queue_mock, mock_sleep):
        from google.appengine.api.taskqueue import TransientError
        from furious.async import Async

        def add(task, *args, **kwargs):
            def add_second(task, *args, **kwargs):
                assert task

            queue_mock.return_value.add.side_effect = add_second
            raise TransientError()

        queue_mock.return_value.add.side_effect = add

        async_job = Async("something", queue='my_queue')
        async_job.start()

        queue_mock.assert_called_with(name='my_queue')
        self.assertEqual(2, queue_mock.return_value.add.call_count)
        self.assertEqual(1, mock_sleep.call_count)
Parse the command line arguments.
dataset/ETHPy150Open Workiva/furious/furious/tests/test_async.py/TestAsync.test_start_hits_transient_error--crossover with--dataset/ETHPy150Open GeoscienceAustralia/agdc/src/remove_tiles.py/TileRemover.parse_args