A simple web server for unit testing purposes. Acts as context manager for teardown.
pip install -r requirements.txt
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"
If you need to publish a new version of this package you can use this command:
$ make build
$ make dist
Licensed under MIT license
. View license.