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
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.0.0.tar.gz
(17.4 kB
view hashes)
Built Distribution
Close
Hashes for jj_district42-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e101dd5da2692fd55c52c360e3b65b731a8f57819ec415d3ea01556e7d758d5f |
|
MD5 | ff4ec94dfa17d501654a045b1fa47c2f |
|
BLAKE2b-256 | 4009dea4e35027736bb3e0c7b68821df5759b3b308f2162695856af7497ef867 |