Skip to main content

Mountebank wrapper for mocking HTTP APIs

Project description

# Mountebank

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

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for pymountebank-1.0.3.tar.gz
Algorithm Hash digest
SHA256 68235e4818d6b2dc441d5cb45041303ef1f48c2e8adcaadc22e1ab8ac5748dfd
MD5 63ad846836477c437b68f902b81c4790
BLAKE2b-256 7e5cd761ff5217a0813a90ba9d640af62f476a716eebeb392b3050e967f8278d

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