def test_run(self, fake_feed): # test queue = RequestQueue(Mock(), Mock()) queue.run() # validation queue.downloader.download.assert_called_with(fake_feed())
def test_run(self, fake_feed): # test queue = RequestQueue(Mock()) queue.run() # validation queue.downloader.download.assert_called_with(fake_feed())
def test_run_with_exception(self, fake_feed, fake_drain): # test queue = RequestQueue(Mock(), Mock()) queue.downloader.download.side_effect = ValueError() queue.run() # validation queue.downloader.download.assert_called_with(fake_feed()) fake_drain.assert_called_with()
def test_run_with_exception(self, fake_feed, fake_drain): # test queue = RequestQueue(Mock()) queue.downloader.download.side_effect = ValueError() queue.run() # validation queue.downloader.download.assert_called_with(fake_feed()) fake_drain.assert_called_with()
def test_run(self, fake_feed): canceled = Mock() canceled.is_set.return_value = False # test queue = RequestQueue(canceled, Mock()) queue.run() # validation queue.downloader.download.assert_called_with(fake_feed())
def test_run(self, fake_feed): canceled = Mock() canceled.is_set.return_value = False # test queue = RequestQueue(canceled, Mock()) queue.run() # validation queue.downloader.download.assert_called_with(fake_feed())
def test_run_with_exception(self, fake_feed, fake_drain): canceled = Mock() canceled.is_set.return_value = False # test queue = RequestQueue(canceled, Mock()) queue.downloader.download.side_effect = ValueError() queue.run() # validation queue.downloader.download.assert_called_with(fake_feed()) fake_drain.assert_called_with()
def test_run_with_exception(self, fake_feed, fake_drain): canceled = Mock() canceled.is_set.return_value = False # test queue = RequestQueue(canceled, Mock()) queue.downloader.download.side_effect = ValueError() queue.run() # validation queue.downloader.download.assert_called_with(fake_feed()) fake_drain.assert_called_with()