Simple bindings to make Mountebank easier to use from Python
Mountebank is a tool which makes it easier to write tests for Microservice architectures by spawning processes which imitate servers (ie. listening to ports locally and responding to HTTP requests).
npm install -g mountebank --production
pip install mountebank-python
An "imposter" is a process which listens on a port (pretending to be a server)
An imposter has multiple "stubs"
A stub has a list of "predicates" and "responses"
Predicates define if a stub matches and incoming HTTP request
When a stub matches it responds with the next response in it's responses list
Run mb
to start mountebank
In python:
- Define your imposters (example given in mountebank.py)
- Initialize a microservice object
- Make requests to it
Example usage in mountebank.py