Skip to content

Commit

Permalink
Modify ImgurExtractor unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
MalloyDelacroix committed Dec 14, 2018
1 parent 46bf7af commit 9d05e5a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DownloaderForReddit/Extractors/ImgurExtractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def rate_limit_exceeded_error(self):
self.set_timeout()
message = 'Imgur rate limit exceeded. Setting time out limit of %s seconds' % \
(ExtractorUtils.timeout_dict[type(self).__name__])
Injector.get_queue().put('\n%s\n' % message)
Injector.get_queue().put('\n%s\n' % message) # inform user of rate limit
self.handle_failed_extract(message=message, save=True, imgur_error_message='rate limit exceeded')

def set_timeout(self):
Expand Down
2 changes: 1 addition & 1 deletion Tests/UnitTests/Extractors/test_Extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,4 @@ def test_timeout_dict(self, sleep_mock, ex_mock, extractor_mock):
ExtractorUtils.timeout_dict['ImgurExtractor'] = time.time()
extractor = Extractor(MockObjects.get_user_with_single_content())
extractor.extract(MockObjects.get_mock_post_imgur())
sleep_mock.assert_called_with(Const.TIMEOUT_INCREMENT)
sleep_mock.assert_called()

0 comments on commit 9d05e5a

Please sign in to comment.