Skip to main content

A simple request-mocker that will download

Project description

A simple request mocker that caches requests responses to files.

Installation

Install it with pip:

pip install rmoq

Usage

The example below will put the content of fixtures/example.com.txt into the body of the request and if it does not exist the content will be downloaded and stored in fixtures/example.com.txt.

@rmoq.activate()
def test_remote_call():
    response = requests.get('http://example.com')
    assert response.body == 'Example'

More advanced usage can be found in the documentation.


MIT © Rolf Erik Lekang

Project details


Release history Release notifications

This version
History Node

0.4.1

History Node

0.4.0

History Node

0.3.0

History Node

0.2.5

History Node

0.2.4

History Node

0.2.3

History Node

0.2.2

History Node

0.2.1

History Node

0.2.0

History Node

0.1.0

History Node

0.0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
rmoq-0.4.1-py2.py3-none-any.whl (6.1 kB) Copy SHA256 hash SHA256 Wheel 3.4 Apr 3, 2015
rmoq-0.4.1.tar.gz (4.0 kB) Copy SHA256 hash SHA256 Source None Apr 3, 2015

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page