edgi-govdata-archiving / web-monitoring-diff

Tools for diffing and comparing web content. Also includes a web server that makes diffs available as an HTTP service.
https://web-monitoring-diff.readthedocs.io/
GNU General Public License v3.0
11 stars 4 forks source link

Make sure all test HTTP requests are mocked #159

Closed Mr0grog closed 9 months ago

Mr0grog commented 9 months ago

Some tests are currently failing in #158 because http://httpstat.us is down. We shouldn’t really be making any live requests in tests if we can avoid it, and this fixes that.

This adds a decorator that makes using MockAsynchttpClient a bit easier, adds error raising functionality to it, and makes sure it gets invoked everywhere it should be (a lot of missing callsites!).