Skip to main content

Pydantic models for pytest-httpchain

Project description

pytest-httpchain-models

The Pydantic models that define and validate pytest-httpchain test scenarios.

This package is the typed schema for a scenario file. It models the whole structure — Scenario, Stage, Request, the discriminated body types (JSON, XML, form, text, base64, binary, files, GraphQL), variable substitutions, response verification and save steps, parametrization, and parallel execution configs. Every model derives from a strict base (extra="forbid"), so a misspelled field is rejected at validation time instead of silently changing a request. Validation runs in two phases: first with {{ }} template strings treated as opaque, then again on the concrete values after the templates engine renders them, so the rendered value is checked against its real type. The package also generates the editor-facing JSON Schema published with the project.

Role in the workspace

After pytest-httpchain-jsonref inlines a scenario's $ref directives, the plugin validates the resulting document against Scenario here. These models are the single source of truth for what a scenario may contain — both at pytest collection time and for the JSON Schema editors consume.

Usage

from pytest_httpchain_models.entities import Scenario

scenario = Scenario.model_validate(
    {
        "stages": [
            {
                "name": "health",
                "request": {"url": "https://api.example.com/health"},
                "response": [{"verify": {"status": 200}}],
            }
        ]
    }
)

Links

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

pytest_httpchain_models-0.8.0.tar.gz (11.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytest_httpchain_models-0.8.0-py3-none-any.whl (13.0 kB view details)

Uploaded Python 3

File details

Details for the file pytest_httpchain_models-0.8.0.tar.gz.

File metadata

  • Download URL: pytest_httpchain_models-0.8.0.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pytest_httpchain_models-0.8.0.tar.gz
Algorithm Hash digest
SHA256 15f320bfc7a2c24bcb1bdefae1cd50c801895025f3f17ff6c08b38da696132b7
MD5 5c32fda85be350c0de8d91a33fe0e26e
BLAKE2b-256 bc70bb1b2ba603d18b44a5408a28468d04f81dd287e9cbb8f9f701820e73caa0

See more details on using hashes here.

Provenance

The following attestation bundles were made for pytest_httpchain_models-0.8.0.tar.gz:

Publisher: publish.yml on aeresov/pytest-httpchain

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pytest_httpchain_models-0.8.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pytest_httpchain_models-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b8f608402ab657ee8fa90f9399668a6e1e7ed9d61170c33e5f75cc4b4683ae7a
MD5 dbe58fa1c0c05f5b9ff0be318064892b
BLAKE2b-256 6536fc616ff6a4a1476388fe4b071c7fe8085ceeadfa9e45936e77723ac88e41

See more details on using hashes here.

Provenance

The following attestation bundles were made for pytest_httpchain_models-0.8.0-py3-none-any.whl:

Publisher: publish.yml on aeresov/pytest-httpchain

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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