Leibniz-HBI / newsfeedback

Tool for extracting and saving news article metadata (and optionally content) at regular intervals.
MIT License
3 stars 0 forks source link

Tackle TimeOut Errors by mocking them #39

Open rwinterschlaf opened 1 year ago

rwinterschlaf commented 1 year ago

to quote @FlxVctr :

"You can try to test this with a mocked Timeouterror.

I've done that with Twitter Response Errors here: https://github.com/Leibniz-HBI/twacapic/blob/main/tests/test_twacapic.py#L428

I've used the unittest mocks (https://docs.python.org/3/library/unittest.mock.html)

But there might be more elegant solutions for pytest."