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("/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


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.3.0.tar.gz (4.9 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: pymountebank-1.3.0.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pymountebank-1.3.0.tar.gz
Algorithm Hash digest
SHA256 2923518e44dfb92ed8d029c97550fd521cc208fa08df6d6898c30836903cf183
MD5 c18dc50f79a69d6c1b32148e6a2a2059
BLAKE2b-256 0470a9754abdafcd145cae8835c37dbf144cfc5b76f7ba90950aeb1ce1d7a49e

See more details on using hashes here.

Supported by

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