Check HTTP response status
Checks your HTTP response has the expected status, throws an error if not:
>>> response = esc.expect(404, requests.get("http://example.com")) esc.UnexpectedStatusCode: Expected one of HTTP 404, but http://example.com/ returned 200 with content: <!doctype html>
- Status code checks are ever so slightly easier.
- Unit test failure messages are far more helpful.
Currently supports the following:
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size esc-0.1.tar.gz (2.2 kB)||File type Source||Python version None||Upload date||Hashes View|