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.7.0.tar.gz (10.2 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.7.0-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pytest_httpchain_models-0.7.0.tar.gz
  • Upload date:
  • Size: 10.2 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.7.0.tar.gz
Algorithm Hash digest
SHA256 44a03c49d0918283f96928bfb31c47b1414b29ee87fc22f1ff6c6418ec913dac
MD5 0ed85b2778a2022c9ba336182a2c3f15
BLAKE2b-256 31de5b048dae39f69f7e41b6fb0b0163ddd8af8a41d02c412f45826e0aadade3

See more details on using hashes here.

Provenance

The following attestation bundles were made for pytest_httpchain_models-0.7.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.7.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pytest_httpchain_models-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6509c74ba7246f86cba76e8b7e8ba72df9521a5359f57fb12caf000870938556
MD5 cf7f5bb1cd7ba59d1f04b9e53825d8f8
BLAKE2b-256 c8a0155cdd4a5449a6b9fe3cef90578cf9dd97aac3b02eea834549d0ac3ec67b

See more details on using hashes here.

Provenance

The following attestation bundles were made for pytest_httpchain_models-0.7.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