Mountebank wrapper for mocking HTTP APIs
Project description
This is a simple wrapper library around mountebank. It’s useful for mocking HTTP API services.
Usage
from mountebank import Imposter
imposter = Imposter()
imposter.add_stub("/text", "GET", "What I'm expecting")
with imposter.mockhttp() as url:
assert requests.get(url + "/test").text == "What I'm expecting"
Development
To run the containers:
docker-compose up --build
To test:
docker-compose exec tests /bin/bash -c "cd /apps/mountebank/tests;pytest" docker-compose exec tests2 /bin/bash -c "cd /apps/mountebank/tests;pytest"
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
pymountebank-1.0.5.tar.gz
(4.1 kB
view details)
File details
Details for the file pymountebank-1.0.5.tar.gz.
File metadata
- Download URL: pymountebank-1.0.5.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
057f63a2268be627cd6d5f8b788dc4f6bfd07b0b87e2bc02c9c5a984f9a08871
|
|
| MD5 |
856b0844325dc370e99ea94cda0a5265
|
|
| BLAKE2b-256 |
8699e558a526cf29d111db34586401494168ce3e5c88d3e2e3de78fd17f00541
|