Skip to main content

Check HTTP response status

Project description

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>

Why?

  1. Status code checks are ever so slightly easier.
  2. Unit test failure messages are far more helpful.

Supported libraries

Currently supports the following:

  • requests

Project details


Release history Release notifications

This version
History Node

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
esc-0.1.tar.gz (2.2 kB) Copy SHA256 hash SHA256 Source None May 16, 2016

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page