Skip to main content

No project description provided

Project description

jj-district42

⚠️ This package has been renamed to jj-d42. The jj-district42 package on PyPI is no longer maintained. For updates and improvements, please use jj-d42 going forward.

PyPI PyPI - Downloads Python Version

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
)

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.2.tar.gz (18.5 kB view details)

Uploaded Source

Built Distribution

jj_district42-1.2.2-py3-none-any.whl (35.7 kB view details)

Uploaded Python 3

File details

Details for the file jj_district42-1.2.2.tar.gz.

File metadata

  • Download URL: jj_district42-1.2.2.tar.gz
  • Upload date:
  • Size: 18.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.10

File hashes

Hashes for jj_district42-1.2.2.tar.gz
Algorithm Hash digest
SHA256 2bab3a4fad4d21058d9820f7b864675c2eaaeb353ba069dc74938fbc7d4cac1c
MD5 6acdc6657b390a37dad2bbe26bf5c36f
BLAKE2b-256 f1ff975f43833f9552770ae33acfe0c726ae500c47f132c1faa0b85382458dee

See more details on using hashes here.

File details

Details for the file jj_district42-1.2.2-py3-none-any.whl.

File metadata

File hashes

Hashes for jj_district42-1.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 44aea0f042c3c3a26b310d5a47e06b4feb69302c7fb9e7b0c1fef1def2c16078
MD5 16b75dfef810d9994b8000ad4c176e46
BLAKE2b-256 73394957297b4350f15273dc1c8a285e1dd4d45499a12e06e776e785b1ba3246

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page