fw-http-testserver
HTTP test server for stubbing / mocking 3rd party services.
Installation
Add as a poetry dev dependency to your project:
poetry add --dev fw-http-testserver
Usage
import requests
pytest_plugins = "fw_http_testserver"
def test_my_app(http_testserver):
http_testserver.add_response("/path", {"foo": "bar"})
resp = requests.get(f"{http_testserver.url}/path")
assert resp.json() == {"foo": "bar"}
Development
Install the project using poetry and enable pre-commit:
poetry install
pre-commit install
License
Metadata
Release files for fw-http-testserver 1.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| fw_http_testserver-1.2.3-py3-none-any.whl | Python 3 | none | any | Details |
Release files / fw_http_testserver-1.2.3-py3-none-any.whl
| Download URL | fw_http_testserver-1.2.3-py3-none-any.whl |
|---|---|
| Size | 4.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
327abc939f6b3261a48026cf84c48ee5bd68c2a1ceeb43679051e4aab7b074f6
|
|
BLAKE2b-256 checksum How to use checksums |
31961853451714321278a0d6bfd346203f5fe78566d1d5958bbaeb53a1516121
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.4 CPython/3.12.7 Linux/5.15.154+
|