Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wiliamsouza/echod
A fully configurable mock server and an HTTP callback recorder
https://github.com/wiliamsouza/echod
Last synced: about 2 months ago
JSON representation
A fully configurable mock server and an HTTP callback recorder
- Host: GitHub
- URL: https://github.com/wiliamsouza/echod
- Owner: wiliamsouza
- Archived: true
- Created: 2015-07-09T19:02:59.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-10-21T15:44:20.000Z (about 9 years ago)
- Last Synced: 2024-11-07T01:06:34.963Z (2 months ago)
- Language: Python
- Homepage:
- Size: 289 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
Awesome Lists containing this project
- starred-awesome - echod - A fully configurable mock server and an HTTP callback recorder (Python)
README
echod
=====[![Build Status](https://travis-ci.org/wiliamsouza/echo.svg)](https://travis-ci.org/wiliamsouza/echo)
[![Coverage Status](https://coveralls.io/repos/wiliamsouza/echo/badge.svg?branch=master&service=github)](https://coveralls.io/github/wiliamsouza/echo?branch=master)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 Docker instance container.Mock
----```python
from echod.mock import Mock# This will create a mock that accepts `POST`.
expectation = {
'method': 'POST',
'response': {'body': {'email': '[email protected]', 'name': 'John Doe'},
'headers': {'content_type': 'application/json'},
'status_code': 201}
}with Mock(expectation) as client:
# The URL for the mock
client.mock_url # 'http://127.0.0.1:9876/mock/fbf01f94169640de9e585fe5e30a0958/'# This method will make a request to the mock
response = client.response()
assert response.status_code == 201
```