Skip to main content
Help the Python Software Foundation raise $60,000 USD by December 31st!  Building the PSF Q4 Fundraiser

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.

Files for pymountebank, version 1.4.1
Filename, size File type Python version Upload date Hashes
Filename, size pymountebank-1.4.1.tar.gz (5.0 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page