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("/test", "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.4.1.tar.gz
(5.0 kB
view details)
File details
Details for the file pymountebank-1.4.1.tar.gz.
File metadata
- Download URL: pymountebank-1.4.1.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3a71a5b24ddbe3b50628733fa2d7cf6ee1bc7df2bec6fbd951f268f8c2b26ab5
|
|
| MD5 |
c92de92da826750f3d887e39e5d25dfe
|
|
| BLAKE2b-256 |
1077f90a3fe4937df87a2143ea2d412f348cd5e775b9c369480227727e16afd9
|