Echod is a mock server and a callback recorder.
Project description
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 == {...}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
echod-0.1.0.tar.gz
(5.4 kB
view details)
Built Distribution
echod-0.1.0-py3-none-any.whl
(7.6 kB
view details)
File details
Details for the file echod-0.1.0.tar.gz
.
File metadata
- Download URL: echod-0.1.0.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f5caf72235a80580e03e1643cd5271ab6775482cf0b4a8d9b04c20ce5db46108 |
|
MD5 | a4f52d9e1bdf74bd6339406f061fc961 |
|
BLAKE2b-256 | 69beda8af1d9988b083d706285f2d41694e4f584d760bb89ce3b2b31490be34d |
File details
Details for the file echod-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: echod-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6775a63c414b6ef80bdd037e09bd9a02761a5bb33255146a9aada312fdb7fb6b |
|
MD5 | 96a76468fc90c05a7f54c725241990f1 |
|
BLAKE2b-256 | 5ac4242c8a4be21b8a432b4b87f482879388ce52c2f60004e3513fe2adfe4112 |