Skip to main content

Esc: Expect Status Code

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 Provenance Actions
esc-0.1.tar.gz 2.2 kB Without provenance Details for esc-0.1.tar.gz

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

Security for esc 0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1 This release

1 release file No provenance

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