Skip to main content

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


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)

Uploaded Source

File details

Details for the file pymountebank-1.4.1.tar.gz.

File metadata

File hashes

Hashes for pymountebank-1.4.1.tar.gz
Algorithm Hash digest
SHA256 3a71a5b24ddbe3b50628733fa2d7cf6ee1bc7df2bec6fbd951f268f8c2b26ab5
MD5 c92de92da826750f3d887e39e5d25dfe
BLAKE2b-256 1077f90a3fe4937df87a2143ea2d412f348cd5e775b9c369480227727e16afd9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page