A simple request mocker that caches requests to files.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs
rmoq
.coveragerc
.frigg.yml
.gitignore
.isort.cfg
LICENSE
README.rst
requirements.txt
setup.cfg
setup.py
test_rmoq.py
tox.ini

README.rst

rmoq frigg coverage Latest Version

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