Skip to main content

Async mock HTTP server for pytest, built on top of aiohttp.

Project description

async-pytest-httpserver

async-pytest-httpserver is a fully asynchronous mock HTTP server for use in pytest tests, built on top of aiohttp.

It is designed for testing code that performs HTTP requests (aiohttp, httpx, requests, etc.) without relying on real external services.

Features

  • Fully asynchronous - implemented using aiohttp.web.Application
  • Dynamic runtime mocking — add or modify mock routes while the server is running
  • Seamless integration with pytest-aiohttp and pytest-asyncio
  • Real TCP server — works with any HTTP client (aiohttp, httpx, requests, etc.)
  • Supports async handlers — easily define coroutine-based responses

Project details


Download files

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

Source Distribution

async_pytest_httpserver-0.1.0.tar.gz (67.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

async_pytest_httpserver-0.1.0-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file async_pytest_httpserver-0.1.0.tar.gz.

File metadata

File hashes

Hashes for async_pytest_httpserver-0.1.0.tar.gz
Algorithm Hash digest
SHA256 dee5f367b229b7ff2185967352868d4b94fc5e5dd1db15ed67a162b043db7f7e
MD5 236e00b7562639936829d0bfc24f5d19
BLAKE2b-256 9a5a696e6441676620b6f60c42cfb577bdeddd4c8e0ae84ad8f2080841b0f3fe

See more details on using hashes here.

File details

Details for the file async_pytest_httpserver-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for async_pytest_httpserver-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a76f78644ac00a4cecf4029dbc05951fc505f2bca8005586617abe4c6294a754
MD5 688b5dedf8e66d9679a6b9f3e5e902fe
BLAKE2b-256 60b61dc8b713675e029f08fa4d8abf99cdd9b63c357ea4674f0b4af9133bc184

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page