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.2.0.tar.gz
(18.2 kB
view hashes)
Built Distribution
Close
Hashes for jj_district42-1.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0412a5de6dd4c87361c09761a4d0a250d3c6ade1f2d3dd67a94b65bbc5f86222 |
|
MD5 | 7273a4fba4a2d168eb3b2afcea433ecf |
|
BLAKE2b-256 | ab9e4aa6dc74c35effde06a797756ca4c5c6d42e5ca59d086142e19cb477261d |