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 | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1046aff691a8bf7951e80eb1b9c14d79ea15cae9502114a6526abf645da7a15f
|
|
| MD5 |
deb5d9ad61c3d2e432e3ef35b0302d69
|
|
| BLAKE2b-256 |
56563c4c9a2a89576119d5b4ffd501288962559ef6cc68080599f8156488b083
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c199c9bb32fd3884585968d879f7e764508b475ec5911cb2e3e255cb1d58bf30
|
|
| MD5 |
1a10ac7b9fef36f5576c322ff4a8f11d
|
|
| BLAKE2b-256 |
a70e67dae383593ed1d30dbac9c9b76bc48ba209b30eeec18eb4c179ed048c9b
|