No project description provided
Project description
jj-district42
Installation
pip3 install jj-district42
Usage
import jj
import httpx
from jj.mock import mocked
from jj_district42 import HistorySchema
from valera import validate_or_fail
matcher = jj.match("GET", "/users")
response = jj.Response(status=200, json=[])
with mocked(matcher, response) as mock:
resp = httpx.get("http://localhost:8080/users", params={"user_id": 1})
assert validate_or_fail(
HistorySchema % [
{
"request": {
"method": "GET",
"path": "/users",
"params": {"user_id": "1"},
}
}
],
mock.history
)
More examples are available here
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
jj_district42-1.2.1.tar.gz
(18.2 kB
view hashes)
Built Distribution
Close
Hashes for jj_district42-1.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 769e87181b2b54654e6675376a9c826694af2902e62137187217f637fe3b6f58 |
|
MD5 | 1262d152210de661e3bc833f1533d2af |
|
BLAKE2b-256 | ffdb1a479edd86cf882e0a8e9d3e805b348474fa7d15451b6bf587d86ceeeb32 |