Skip to main content

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

Metadata

Release files for esc 0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for esc 0.1
File Size Uploaded
esc-0.1.tar.gz 2.2 kB Details

Release files / esc-0.1.tar.gz

Download URL esc-0.1.tar.gz
Size 2.2 kB
Tags Source
SHA-256 checksum
How to use checksums
761c5925908a4494c91c668ea3d2c8856513e07227536066a5c17c5a1e7c52f7
BLAKE2b-256 checksum
How to use checksums
682308b611051c1b5abdccd3312d7c949cffba7016e2e8b67f8bd45531ad4af0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page