Metadata-Version: 2.0
Name: echod
Version: 0.1.0
Summary: Echod is a mock server and a callback recorder.
Home-page: https://github.com/wiliamsouza/echod
Author: The Echo Authors
Author-email: wiliamsouza83@gmail.com
License: UNKNOWN
Keywords: mock chaos monkey proxy callback
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Environment :: No Input/Output (Daemon)
Classifier: Topic :: Internet :: WWW/HTTP :: HTTP Servers
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Testing
Requires-Dist: aiohttp (==0.16.5)
Requires-Dist: aioredis (==0.2.2)
Requires-Dist: prettyconf (==1.1.2)
Provides-Extra: dev
Requires-Dist: pyflakes; extra == 'dev'
Requires-Dist: pep8; extra == 'dev'
Requires-Dist: pylint; extra == 'dev'
Requires-Dist: check-manifest; extra == 'dev'
Requires-Dist: ipython; extra == 'dev'
Requires-Dist: ipdb; extra == 'dev'
Requires-Dist: sphinx; extra == 'dev'
Requires-Dist: sphinx-rtd-theme; extra == 'dev'
Requires-Dist: sphinxcontrib-napoleon; extra == 'dev'
Requires-Dist: wheel; extra == 'dev'
Requires-Dist: pytest-cov; extra == 'dev'
Requires-Dist: pytest-cache; extra == 'dev'
Requires-Dist: pytest-timeout; extra == 'dev'
Requires-Dist: pytest-asyncio (==0.2.0); extra == 'dev'
Requires-Dist: tox; extra == 'dev'
Requires-Dist: redis; extra == 'dev'
Provides-Extra: test
Requires-Dist: pytest-cov; extra == 'test'
Requires-Dist: pytest-cache; extra == 'test'
Requires-Dist: pytest-timeout; extra == 'test'
Requires-Dist: pytest-asyncio (==0.2.0); extra == 'test'
Requires-Dist: tox; extra == 'test'
Requires-Dist: redis; extra == 'test'

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 WSGI HTTP Server application.
* A Docker instance container.


Mock
----

```python
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
--------

```python
import requests


with echod.callback() as webhook:
    settings.callback_url = webhook.url
    requests.post()
    webhook.wait_callback(timeout=10)
    webhook.response.data == {...}
```


