Mock Web Server
A simple web server for unit testing purposes. Acts as context manager for teardown.
How to develop
pip install -r requirements.txt
How to use
from mockwebserver import MockWebServer()
import requests
def test_requests_get():
with MockWebServer() as server:
url = server.set('/path/to/page', "page content")
response = requests.get(url)
assert response.ok
assert response.text = "page content"
How to distribute
If you need to publish a new version of this package you can use this command:
$ make build
$ make dist
License
Licensed under MIT license. View license.
Metadata
Release files for mockwebserver 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mockwebserver-0.5.0.tar.gz | 3.2 kB | Without provenance | Details for mockwebserver-0.5.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mockwebserver-0.5.0-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for mockwebserver-0.5.0-py2.py3-none-any.whl |
Total release size: 7.3 kB
Release files / mockwebserver-0.5.0.tar.gz
| Download URL | mockwebserver-0.5.0.tar.gz |
|---|---|
| Size | 3.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
87e47f6467c2822b1d61c6878d950dbb3aec3ae447d7b6503f3a7abd92506d08
|
|
BLAKE2b-256 checksum How to use checksums |
ed997ba6bf3538d26fdbc87e4bd760d87b83645ce2a45513a0d71f9b0dd8ec47
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/2.7.15
|
Release files / mockwebserver-0.5.0-py2.py3-none-any.whl
| Download URL | mockwebserver-0.5.0-py2.py3-none-any.whl |
|---|---|
| Size | 4.0 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
5b1e325fc594f65090ff2b3a87067ab93b2fcfbb974ef250edbff0eeeb4014a0
|
|
BLAKE2b-256 checksum How to use checksums |
b215f20c29617b6afac0639bc41df7a42958d7002e9786efbb92a6dbc1df0803
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/2.7.15
|
Security for mockwebserver 0.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.