Skip to main content

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

Download files

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

Source Distribution

rmoq-0.4.2.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rmoq-0.4.2-py2.py3-none-any.whl (6.2 kB view details)

Uploaded Python 2Python 3

File details

Details for the file rmoq-0.4.2.tar.gz.

File metadata

  • Download URL: rmoq-0.4.2.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.6.9

File hashes

Hashes for rmoq-0.4.2.tar.gz
Algorithm Hash digest
SHA256 1046aff691a8bf7951e80eb1b9c14d79ea15cae9502114a6526abf645da7a15f
MD5 deb5d9ad61c3d2e432e3ef35b0302d69
BLAKE2b-256 56563c4c9a2a89576119d5b4ffd501288962559ef6cc68080599f8156488b083

See more details on using hashes here.

File details

Details for the file rmoq-0.4.2-py2.py3-none-any.whl.

File metadata

  • Download URL: rmoq-0.4.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.6.9

File hashes

Hashes for rmoq-0.4.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 c199c9bb32fd3884585968d879f7e764508b475ec5911cb2e3e255cb1d58bf30
MD5 1a10ac7b9fef36f5576c322ff4a8f11d
BLAKE2b-256 a70e67dae383593ed1d30dbac9c9b76bc48ba209b30eeec18eb4c179ed048c9b

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.4.2 This release

2 files

0.4.1

2 files

0.4.0

1 file

0.3.0

2 files

0.2.5

2 files

0.2.4

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.0

2 files

0.0.1

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page