bbyars / mountebank-python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mountebank-Python

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 locally.

Installation

npm install -g mountebank --production

pip install mountebank-python

Usage

Imposter - A process which listens on a port (pretending to be a server) Imposter has multiple stubs A stub has multiple "predicates" and "responses" Predicates define which stub matches when a stub matches it uses its next response

Run mb to start mountebank

In python:

  1. Define your imposters (example given in mountebank.py)
  2. Initialize a microservice object
  3. Make requests to it

Example usage in mountebank.py

About

License:MIT License


Languages

Language:Python 100.0%