echod
Echod is a fully configurable mock server and an HTTP callback recorder. It is perfect to test external services.
It is easy to controlling Echod on the fly from your code or using your testing framework setup mechanism.
The main part of Echod is an HTTP server with an REST API, the Echo HTTP server have a lot of flexibility and support many start up methods.
Echod server can be run as:
A standalone using echod command line tool.
A WSGI HTTP Server application.
A Docker instance container.
Mock
import echod
mock_response = {
'status_code': 200,
'body': {...},
}
request_contain = {
'body': {...}
}
expectation = {
'method': 'POST',
'path': '/v1/users/',
'request': request_contain,
'response': mock_response,
}
with echod.mock(**expectation) as client:
response = client.post()
response.status_code == 200
callback
import requests
with echod.callback() as webhook:
settings.callback_url = webhook.url
requests.post()
webhook.wait_callback(timeout=10)
webhook.response.data == {...}
Metadata
Release files for echod 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| echod-0.1.0.tar.gz | 5.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| echod-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.0 kB
Release files / echod-0.1.0.tar.gz
| Download URL | echod-0.1.0.tar.gz |
|---|---|
| Size | 5.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f5caf72235a80580e03e1643cd5271ab6775482cf0b4a8d9b04c20ce5db46108
|
|
BLAKE2b-256 checksum How to use checksums |
69beda8af1d9988b083d706285f2d41694e4f584d760bb89ce3b2b31490be34d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / echod-0.1.0-py3-none-any.whl
| Download URL | echod-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6775a63c414b6ef80bdd037e09bd9a02761a5bb33255146a9aada312fdb7fb6b
|
|
BLAKE2b-256 checksum How to use checksums |
5ac4242c8a4be21b8a432b4b87f482879388ce52c2f60004e3513fe2adfe4112
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |