Simple http server for API mocking during automated testing
Example usage
Using requests library:
>>> import requests
>>> from httpsrv import Server
>>> server = Server(8080).start()
>>> server.on('GET', '/').text('hello')
>>> res = requests.get('http://localhost:8080')
>>> assert res.text == 'hello'
Installation
pip install httpsrv
Documentation
Metadata
Release files for httpsrv 0.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| httpsrv-0.1.6-py3-none-any.whl | Python 3 | none | any | Details |
Release files / httpsrv-0.1.6-py3-none-any.whl
| Download URL | httpsrv-0.1.6-py3-none-any.whl |
|---|---|
| Size | 5.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
45a75b1f059e6e5edd1db6306c493d3324b77f7d6cde9f1e9d49e91964239301
|
|
BLAKE2b-256 checksum How to use checksums |
516d12e546b23011467f5eb7adc965888857af2f55cf83cb9c4eeb319c3b9b09
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |