schemathesis 3.19.0__tar.gz → 3.19.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {schemathesis-3.19.0 → schemathesis-3.19.1}/.pre-commit-config.yaml +2 -3
- {schemathesis-3.19.0 → schemathesis-3.19.1}/PKG-INFO +2 -3
- {schemathesis-3.19.0 → schemathesis-3.19.1}/docs/changelog.rst +20 -3
- {schemathesis-3.19.0 → schemathesis-3.19.1}/example/README.rst +1 -1
- schemathesis-3.19.1/example/app/models.py +10 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/example/requirements.in +0 -1
- {schemathesis-3.19.0 → schemathesis-3.19.1}/example/requirements.txt +0 -1
- {schemathesis-3.19.0 → schemathesis-3.19.1}/pyproject.toml +3 -4
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/auths.py +20 -20
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/cli/__init__.py +20 -20
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/cli/cassettes.py +18 -18
- schemathesis-3.19.1/src/schemathesis/cli/context.py +46 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/cli/debug.py +3 -3
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/cli/junitxml.py +4 -4
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/constants.py +3 -3
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/exceptions.py +9 -9
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/extra/pytest_plugin.py +1 -1
- schemathesis-3.19.1/src/schemathesis/failures.py +144 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/filters.py +13 -13
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/hooks.py +11 -11
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/lazy.py +16 -16
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/models.py +97 -97
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/parameters.py +5 -6
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/runner/events.py +55 -55
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/runner/impl/core.py +26 -26
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/runner/impl/solo.py +6 -7
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/runner/impl/threadpool.py +5 -5
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/runner/serialization.py +50 -50
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/schemas.py +23 -23
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/serializers.py +3 -3
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/service/ci.py +25 -25
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/service/client.py +2 -2
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/service/events.py +12 -13
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/service/hosts.py +4 -4
- schemathesis-3.19.1/src/schemathesis/service/metadata.py +41 -0
- schemathesis-3.19.1/src/schemathesis/service/models.py +25 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/service/report.py +30 -31
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/service/serialization.py +2 -4
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/specs/graphql/schemas.py +8 -8
- schemathesis-3.19.1/src/schemathesis/specs/openapi/expressions/context.py +12 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/specs/openapi/expressions/lexer.py +11 -12
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/specs/openapi/expressions/nodes.py +16 -16
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/specs/openapi/expressions/parser.py +1 -1
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/specs/openapi/links.py +15 -17
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/specs/openapi/negative/__init__.py +5 -5
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/specs/openapi/negative/mutations.py +6 -6
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/specs/openapi/parameters.py +12 -13
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/specs/openapi/references.py +2 -2
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/specs/openapi/schemas.py +11 -15
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/specs/openapi/security.py +7 -7
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/specs/openapi/stateful/links.py +4 -4
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/stateful.py +19 -19
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/targets.py +5 -6
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/types.py +11 -13
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/utils.py +2 -2
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/runner/test_runner.py +3 -3
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/service/conftest.py +5 -5
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/service/test_report.py +2 -2
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/specs/openapi/conftest.py +5 -3
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/test_models.py +10 -2
- schemathesis-3.19.0/example/app/models.py +0 -10
- schemathesis-3.19.0/src/schemathesis/cli/context.py +0 -46
- schemathesis-3.19.0/src/schemathesis/failures.py +0 -145
- schemathesis-3.19.0/src/schemathesis/service/metadata.py +0 -42
- schemathesis-3.19.0/src/schemathesis/service/models.py +0 -26
- schemathesis-3.19.0/src/schemathesis/specs/openapi/expressions/context.py +0 -12
- {schemathesis-3.19.0 → schemathesis-3.19.1}/.dockerignore +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/.github/FUNDING.yml +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/.github/workflows/build.yml +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/.github/workflows/codeql-analysis.yml +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/.github/workflows/commit.yml +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/.github/workflows/example-build.yml +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/.github/workflows/example-no-build.yml +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/.github/workflows/master_update.yml +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/.github/workflows/release.yml +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/.github/workflows/scheduled.yml +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/.gitignore +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/.gitmodules +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/.readthedocs.yml +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/.relint.yml +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/.rstcheck.cfg +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/.yamllint +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/CITATION.cff +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/CODE_OF_CONDUCT.md +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/CONTRIBUTING.rst +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/Dockerfile +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/Dockerfile.buster +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/LICENSE +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/README.md +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/changelog.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/docs/Makefile +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/docs/api.rst +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/docs/auth.rst +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/docs/cli.rst +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/docs/compatibility.rst +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/docs/conf.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/docs/continuous_integration.rst +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/docs/contrib.rst +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/docs/examples.rst +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/docs/extending.rst +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/docs/faq.rst +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/docs/graphql.rst +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/docs/how.rst +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/docs/index.rst +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/docs/introduction.rst +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/docs/python.rst +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/docs/recipes.rst +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/docs/requirements.txt +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/docs/service.rst +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/docs/stateful.rst +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/docs/targeted.rst +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/example/Dockerfile +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/example/app/app.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/example/app/db.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/example/app/openapi.yaml +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/example/app/validation.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/example/app/views.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/example/database/schema.sql +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/example/docker-compose.yml +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/example/main.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/example/test/__init__.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/example/test/conftest.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/example/test/hooks.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/example/test/test_app.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/img/demo.gif +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/img/service_api_created.png +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/img/service_api_form.png +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/img/service_github_report.png +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/img/service_no_apis_yet.png +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/img/service_non_conforming_response.png +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/img/service_run_results.png +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/img/service_server_error.png +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/mypy.ini +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/__init__.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/_compat.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/_hypothesis.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/checks.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/cli/callbacks.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/cli/constants.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/cli/handlers.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/cli/options.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/cli/output/__init__.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/cli/output/default.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/cli/output/short.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/contrib/__init__.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/contrib/openapi/__init__.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/contrib/openapi/formats/__init__.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/contrib/openapi/formats/uuid.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/contrib/unique_data.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/extra/__init__.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/extra/_aiohttp.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/extra/_flask.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/extra/_server.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/fixups/__init__.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/fixups/fast_api.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/fixups/utf8_bom.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/graphql.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/internal.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/py.typed +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/runner/__init__.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/runner/impl/__init__.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/service/__init__.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/service/auth.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/service/constants.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/service/usage.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/specs/__init__.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/specs/graphql/__init__.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/specs/graphql/loaders.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/specs/graphql/nodes.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/specs/graphql/scalars.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/specs/openapi/__init__.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/specs/openapi/_hypothesis.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/specs/openapi/checks.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/specs/openapi/constants.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/specs/openapi/converter.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/specs/openapi/definitions.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/specs/openapi/examples.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/specs/openapi/expressions/__init__.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/specs/openapi/expressions/errors.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/specs/openapi/filters.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/specs/openapi/loaders.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/specs/openapi/negative/types.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/specs/openapi/negative/utils.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/specs/openapi/serialization.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/specs/openapi/stateful/__init__.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/specs/openapi/utils.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/specs/openapi/validation.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/src/schemathesis/throttling.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/__init__.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/apps/__init__.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/apps/_graphql/__init__.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/apps/_graphql/_fastapi/__init__.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/apps/_graphql/_fastapi/app.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/apps/_graphql/_flask/__init__.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/apps/_graphql/_flask/app.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/apps/_graphql/schema.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/apps/openapi/__init__.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/apps/openapi/_aiohttp/__init__.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/apps/openapi/_aiohttp/app.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/apps/openapi/_aiohttp/handlers.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/apps/openapi/_fastapi/__init__.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/apps/openapi/_fastapi/app.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/apps/openapi/_flask/__init__.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/apps/openapi/_flask/app.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/apps/openapi/schema.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/auth/__init__.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/auth/conftest.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/auth/test_cli.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/auth/test_provider.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/auth/test_pytest.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/cli/__init__.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/cli/cert.pem +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/cli/conftest.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/cli/output/__init__.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/cli/output/test_default.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/cli/test_asgi.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/cli/test_callbacks.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/cli/test_cassettes.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/cli/test_checks.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/cli/test_commands.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/cli/test_crashes.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/cli/test_hooks.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/cli/test_junitxml.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/cli/test_options.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/cli/test_targeted.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/code_samples/test_curl.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/code_samples/test_python.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/conftest.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/contrib/openapi/formats/test_uuid.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/contrib/test_install.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/contrib/test_unique_data.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/data/petstore_v2.yaml +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/data/petstore_v3.yaml +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/data/simple_openapi.yaml +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/data/simple_swagger.yaml +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/extra/__init__.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/extra/test_aiohttp.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/filters/test_matching.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/hooks/test_hooks.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/loaders/conftest.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/loaders/test_common.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/loaders/test_graphql.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/loaders/test_openapi.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/runner/test_checks.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/runner/test_events.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/service/__init__.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/service/test_auth.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/service/test_ci.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/service/test_cli.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/service/test_serialization.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/service/test_usage.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/specs/graphql/test_basic.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/specs/graphql/test_custom_scalars.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/specs/graphql/test_pytest.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/specs/openapi/parameters/test_forms.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/specs/openapi/parameters/test_non_payload.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/specs/openapi/parameters/test_simple_payloads.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/specs/openapi/test_examples.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/specs/openapi/test_expressions.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/specs/openapi/test_hypothesis.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/specs/openapi/test_links.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/specs/openapi/test_negative.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/specs/openapi/test_openapi_checks.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/specs/openapi/test_parameters.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/specs/openapi/test_schemas.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/specs/openapi/test_security.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/specs/openapi/test_serializing.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/specs/openapi/test_stateful.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/specs/openapi/test_utils.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/specs/openapi/test_validation.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/test_app.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/test_asgi.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/test_async.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/test_common_parameters.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/test_converter.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/test_dereferencing.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/test_direct_access.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/test_examples.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/test_filters.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/test_fixups.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/test_hypothesis.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/test_internal.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/test_lazy.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/test_package.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/test_parameters.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/test_parametrization.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/test_petstore.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/test_pytest.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/test_rate_limit.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/test_recoverable_errors.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/test_required.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/test_schemas.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/test_serialization.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/test_stateful.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/test_unittest.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/test_utils.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/test_wsgi.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/test_yaml.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test/utils.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test-corpus/flaky.json +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test-corpus/incompatible_enums.json +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test-corpus/incompatible_regex.json +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test-corpus/incomplete_azure.json +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test-corpus/invalid_path_parameters.json +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test-corpus/recursive_references.json +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test-corpus/test_corpus.py +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/test_server.sh +0 -0
- {schemathesis-3.19.0 → schemathesis-3.19.1}/tox.ini +0 -0
|
@@ -20,7 +20,7 @@ repos:
|
|
|
20
20
|
- id: prettier
|
|
21
21
|
|
|
22
22
|
- repo: https://github.com/jorisroovers/gitlint
|
|
23
|
-
rev: v0.19.
|
|
23
|
+
rev: v0.19.1
|
|
24
24
|
hooks:
|
|
25
25
|
- id: gitlint
|
|
26
26
|
|
|
@@ -59,8 +59,7 @@ repos:
|
|
|
59
59
|
- id: mypy
|
|
60
60
|
exclude: ^(docs/|test/|test-corpus/|example/).*$
|
|
61
61
|
args: ["--ignore-missing-imports"]
|
|
62
|
-
additional_dependencies:
|
|
63
|
-
[types-attrs, types-click, types-requests, types-PyYAML]
|
|
62
|
+
additional_dependencies: [types-click, types-requests, types-PyYAML]
|
|
64
63
|
|
|
65
64
|
- repo: https://github.com/charliermarsh/ruff-pre-commit
|
|
66
65
|
rev: "v0.0.248"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: schemathesis
|
|
3
|
-
Version: 3.19.
|
|
3
|
+
Version: 3.19.1
|
|
4
4
|
Summary: Property-based testing framework for Open API and GraphQL based apps
|
|
5
5
|
Project-URL: Documentation, https://schemathesis.readthedocs.io/en/stable/
|
|
6
6
|
Project-URL: Changelog, https://schemathesis.readthedocs.io/en/stable/changelog.html
|
|
@@ -28,7 +28,6 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
28
28
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
29
29
|
Classifier: Topic :: Software Development :: Testing
|
|
30
30
|
Requires-Python: >=3.7
|
|
31
|
-
Requires-Dist: attrs>=22.1
|
|
32
31
|
Requires-Dist: backoff<3.0,>=2.1.2
|
|
33
32
|
Requires-Dist: click<9.0,>=7.0
|
|
34
33
|
Requires-Dist: colorama<1.0,>=0.4
|
|
@@ -44,7 +43,7 @@ Requires-Dist: pyrate-limiter<3.0,>=2.10
|
|
|
44
43
|
Requires-Dist: pytest-subtests<0.8.0,>=0.2.1
|
|
45
44
|
Requires-Dist: pytest<8,>=4.6.4
|
|
46
45
|
Requires-Dist: pyyaml<7.0,>=5.1
|
|
47
|
-
Requires-Dist: requests
|
|
46
|
+
Requires-Dist: requests<2.29,>=2.22
|
|
48
47
|
Requires-Dist: starlette-testclient==0.2.0
|
|
49
48
|
Requires-Dist: starlette<1,>=0.13
|
|
50
49
|
Requires-Dist: tomli-w<2.0,>=1.0.0
|
|
@@ -4,6 +4,23 @@ Changelog
|
|
|
4
4
|
`Unreleased`_ - TBD
|
|
5
5
|
-------------------
|
|
6
6
|
|
|
7
|
+
.. _v3.19.1:
|
|
8
|
+
|
|
9
|
+
`3.19.1`_ - 2023-04-26
|
|
10
|
+
----------------------
|
|
11
|
+
|
|
12
|
+
**Changed**
|
|
13
|
+
|
|
14
|
+
- Support ``requests<2.29``.
|
|
15
|
+
|
|
16
|
+
**Fixed**
|
|
17
|
+
|
|
18
|
+
- Passing ``params`` / ``cookies`` to ``case.call`` causing ``TypeError``. `#1734`_
|
|
19
|
+
|
|
20
|
+
**Removed**
|
|
21
|
+
|
|
22
|
+
- Direct dependency on ``attrs``.
|
|
23
|
+
|
|
7
24
|
.. _v3.19.0:
|
|
8
25
|
|
|
9
26
|
`3.19.0`_ - 2023-03-22
|
|
@@ -40,8 +57,6 @@ Changelog
|
|
|
40
57
|
|
|
41
58
|
- Unified Schemathesis custom authentication usage via the ``schema.auth`` decorator, replacing the previous ``schema.auth.register`` and ``schema.auth.apply`` methods:
|
|
42
59
|
|
|
43
|
-
Before:
|
|
44
|
-
|
|
45
60
|
.. code:: python
|
|
46
61
|
|
|
47
62
|
import schemathesis
|
|
@@ -3095,7 +3110,8 @@ Deprecated
|
|
|
3095
3110
|
|
|
3096
3111
|
- Initial public release
|
|
3097
3112
|
|
|
3098
|
-
.. _Unreleased: https://github.com/schemathesis/schemathesis/compare/v3.19.
|
|
3113
|
+
.. _Unreleased: https://github.com/schemathesis/schemathesis/compare/v3.19.1...HEAD
|
|
3114
|
+
.. _3.19.1: https://github.com/schemathesis/schemathesis/compare/v3.19.0...v3.19.1
|
|
3099
3115
|
.. _3.19.0: https://github.com/schemathesis/schemathesis/compare/v3.18.5...v3.19.0
|
|
3100
3116
|
.. _3.18.5: https://github.com/schemathesis/schemathesis/compare/v3.18.4...v3.18.5
|
|
3101
3117
|
.. _3.18.4: https://github.com/schemathesis/schemathesis/compare/v3.18.3...v3.18.4
|
|
@@ -3319,6 +3335,7 @@ Deprecated
|
|
|
3319
3335
|
.. _0.3.0: https://github.com/schemathesis/schemathesis/compare/v0.2.0...v0.3.0
|
|
3320
3336
|
.. _0.2.0: https://github.com/schemathesis/schemathesis/compare/v0.1.0...v0.2.0
|
|
3321
3337
|
|
|
3338
|
+
.. _#1734: https://github.com/schemathesis/schemathesis/issues/1734
|
|
3322
3339
|
.. _#1721: https://github.com/schemathesis/schemathesis/issues/1721
|
|
3323
3340
|
.. _#1705: https://github.com/schemathesis/schemathesis/issues/1705
|
|
3324
3341
|
.. _#1702: https://github.com/schemathesis/schemathesis/issues/1702
|
|
@@ -2,7 +2,7 @@ Example project
|
|
|
2
2
|
===============
|
|
3
3
|
|
|
4
4
|
A simple web app, built with `connexion <https://github.com/zalando/connexion>`_,
|
|
5
|
-
`aiohttp <https://github.com/aio-libs/aiohttp>`_
|
|
5
|
+
`aiohttp <https://github.com/aio-libs/aiohttp>`_ and `asyncpg <https://github.com/MagicStack/asyncpg>`_.
|
|
6
6
|
It contains many intentional errors, which should be found by running Schemathesis.
|
|
7
7
|
|
|
8
8
|
There is also `a tutorial <https://habr.com/ru/company/oleg-bunin/blog/576496/>`_ in Russian that follows this example project.
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "schemathesis"
|
|
7
|
-
version = "3.19.
|
|
7
|
+
version = "3.19.1"
|
|
8
8
|
description = "Property-based testing framework for Open API and GraphQL based apps"
|
|
9
9
|
keywords = ["pytest", "hypothesis", "openapi", "swagger", "graphql", "testing"]
|
|
10
10
|
authors = [{ name = "Dmitry Dygalo", email = "dadygalo@gmail.com" }]
|
|
@@ -31,7 +31,6 @@ classifiers = [
|
|
|
31
31
|
"Topic :: Software Development :: Testing",
|
|
32
32
|
]
|
|
33
33
|
dependencies = [
|
|
34
|
-
"attrs>=22.1",
|
|
35
34
|
"backoff>=2.1.2,<3.0",
|
|
36
35
|
"click>=7.0,<9.0",
|
|
37
36
|
"colorama>=0.4,<1.0",
|
|
@@ -47,7 +46,7 @@ dependencies = [
|
|
|
47
46
|
"pytest-subtests>=0.2.1,<0.8.0",
|
|
48
47
|
"pytest>=4.6.4,<8",
|
|
49
48
|
"PyYAML>=5.1,<7.0",
|
|
50
|
-
"requests>=2.22
|
|
49
|
+
"requests>=2.22,<2.29",
|
|
51
50
|
"starlette>=0.13,<1",
|
|
52
51
|
"starlette-testclient==0.2.0",
|
|
53
52
|
"tomli-w>=1.0.0,<2.0",
|
|
@@ -102,7 +101,7 @@ profile = "black"
|
|
|
102
101
|
line_length = 120
|
|
103
102
|
default_section = "THIRDPARTY"
|
|
104
103
|
known_first_party = "schemathesis"
|
|
105
|
-
known_third_party = ["_pytest", "aiohttp", "
|
|
104
|
+
known_third_party = ["_pytest", "aiohttp", "click", "curlify", "fastapi", "flask", "graphene", "graphql", "graphql_server", "hypothesis", "hypothesis_graphql", "hypothesis_jsonschema", "jsonschema", "junit_xml", "packaging", "pydantic", "pytest", "pytest_subtests", "requests", "schemathesis", "starlette", "typing_extensions", "urllib3", "werkzeug", "yaml", "yarl"]
|
|
106
105
|
|
|
107
106
|
[tool.pytest.ini_options]
|
|
108
107
|
addopts = ["-ra", "--strict-markers", "--strict-config"]
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"""Support for custom API authentication mechanisms."""
|
|
2
2
|
import threading
|
|
3
3
|
import time
|
|
4
|
+
from dataclasses import dataclass, field
|
|
4
5
|
from typing import TYPE_CHECKING, Any, Callable, Generic, List, Optional, Type, TypeVar, Union
|
|
5
6
|
|
|
6
|
-
import attr
|
|
7
7
|
import requests.auth
|
|
8
8
|
from typing_extensions import Protocol, runtime_checkable
|
|
9
9
|
|
|
@@ -19,7 +19,7 @@ AUTH_STORAGE_ATTRIBUTE_NAME = "_schemathesis_auth"
|
|
|
19
19
|
Auth = TypeVar("Auth")
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
@
|
|
22
|
+
@dataclass
|
|
23
23
|
class AuthContext:
|
|
24
24
|
"""Holds state relevant for the authentication process.
|
|
25
25
|
|
|
@@ -27,8 +27,8 @@ class AuthContext:
|
|
|
27
27
|
:ivar app: Optional Python application if the WSGI / ASGI integration is used.
|
|
28
28
|
"""
|
|
29
29
|
|
|
30
|
-
operation: "APIOperation"
|
|
31
|
-
app: Optional[Any]
|
|
30
|
+
operation: "APIOperation"
|
|
31
|
+
app: Optional[Any]
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
@runtime_checkable
|
|
@@ -51,19 +51,19 @@ class AuthProvider(Protocol):
|
|
|
51
51
|
"""
|
|
52
52
|
|
|
53
53
|
|
|
54
|
-
@
|
|
54
|
+
@dataclass
|
|
55
55
|
class CacheEntry(Generic[Auth]):
|
|
56
56
|
"""Cached auth data."""
|
|
57
57
|
|
|
58
|
-
data: Auth
|
|
59
|
-
expires: float
|
|
58
|
+
data: Auth
|
|
59
|
+
expires: float
|
|
60
60
|
|
|
61
61
|
|
|
62
|
-
@
|
|
62
|
+
@dataclass
|
|
63
63
|
class RequestsAuth(Generic[Auth]):
|
|
64
64
|
"""Provider that sets auth data via `requests` auth instance."""
|
|
65
65
|
|
|
66
|
-
auth: requests.auth.AuthBase
|
|
66
|
+
auth: requests.auth.AuthBase
|
|
67
67
|
|
|
68
68
|
def get(self, _: AuthContext) -> Optional[Auth]:
|
|
69
69
|
return self.auth # type: ignore[return-value]
|
|
@@ -72,16 +72,16 @@ class RequestsAuth(Generic[Auth]):
|
|
|
72
72
|
case._auth = self.auth
|
|
73
73
|
|
|
74
74
|
|
|
75
|
-
@
|
|
75
|
+
@dataclass
|
|
76
76
|
class CachingAuthProvider(Generic[Auth]):
|
|
77
77
|
"""Caches the underlying auth provider."""
|
|
78
78
|
|
|
79
|
-
provider: AuthProvider
|
|
80
|
-
refresh_interval: int =
|
|
81
|
-
cache_entry: Optional[CacheEntry[Auth]] =
|
|
79
|
+
provider: AuthProvider
|
|
80
|
+
refresh_interval: int = DEFAULT_REFRESH_INTERVAL
|
|
81
|
+
cache_entry: Optional[CacheEntry[Auth]] = None
|
|
82
82
|
# The timer exists here to simplify testing
|
|
83
|
-
timer: Callable[[], float] =
|
|
84
|
-
_refresh_lock: threading.Lock =
|
|
83
|
+
timer: Callable[[], float] = time.monotonic
|
|
84
|
+
_refresh_lock: threading.Lock = field(default_factory=threading.Lock)
|
|
85
85
|
|
|
86
86
|
def get(self, context: AuthContext) -> Optional[Auth]:
|
|
87
87
|
"""Get cached auth value."""
|
|
@@ -200,12 +200,12 @@ class FilterableRequestsAuth(Protocol):
|
|
|
200
200
|
pass
|
|
201
201
|
|
|
202
202
|
|
|
203
|
-
@
|
|
203
|
+
@dataclass
|
|
204
204
|
class SelectiveAuthProvider(Generic[Auth]):
|
|
205
205
|
"""Applies auth depending on the configured filters."""
|
|
206
206
|
|
|
207
|
-
provider: AuthProvider
|
|
208
|
-
filter_set: FilterSet
|
|
207
|
+
provider: AuthProvider
|
|
208
|
+
filter_set: FilterSet
|
|
209
209
|
|
|
210
210
|
def get(self, context: AuthContext) -> Optional[Auth]:
|
|
211
211
|
if self.filter_set.match(context):
|
|
@@ -216,11 +216,11 @@ class SelectiveAuthProvider(Generic[Auth]):
|
|
|
216
216
|
self.provider.set(case, data, context)
|
|
217
217
|
|
|
218
218
|
|
|
219
|
-
@
|
|
219
|
+
@dataclass
|
|
220
220
|
class AuthStorage(Generic[Auth]):
|
|
221
221
|
"""Store and manage API authentication."""
|
|
222
222
|
|
|
223
|
-
providers: List[AuthProvider] =
|
|
223
|
+
providers: List[AuthProvider] = field(default_factory=list)
|
|
224
224
|
|
|
225
225
|
@property
|
|
226
226
|
def is_defined(self) -> bool:
|
|
@@ -4,12 +4,12 @@ import os
|
|
|
4
4
|
import sys
|
|
5
5
|
import traceback
|
|
6
6
|
from collections import defaultdict
|
|
7
|
+
from dataclasses import dataclass
|
|
7
8
|
from enum import Enum
|
|
8
9
|
from queue import Queue
|
|
9
10
|
from typing import Any, Callable, Dict, Generator, Iterable, List, NoReturn, Optional, Tuple, Union, cast
|
|
10
11
|
from urllib.parse import urlparse
|
|
11
12
|
|
|
12
|
-
import attr
|
|
13
13
|
import click
|
|
14
14
|
import hypothesis
|
|
15
15
|
import requests
|
|
@@ -799,33 +799,33 @@ def prepare_request_cert(cert: Optional[str], key: Optional[str]) -> Optional[Re
|
|
|
799
799
|
return cert
|
|
800
800
|
|
|
801
801
|
|
|
802
|
-
@
|
|
802
|
+
@dataclass
|
|
803
803
|
class LoaderConfig:
|
|
804
804
|
"""Container for API loader parameters.
|
|
805
805
|
|
|
806
806
|
The main goal is to avoid too many parameters in function signatures.
|
|
807
807
|
"""
|
|
808
808
|
|
|
809
|
-
schema_location: str
|
|
810
|
-
app: Any
|
|
811
|
-
base_url: Optional[str]
|
|
812
|
-
validate_schema: bool
|
|
813
|
-
skip_deprecated_operations: bool
|
|
814
|
-
data_generation_methods: Tuple[DataGenerationMethod, ...]
|
|
815
|
-
force_schema_version: Optional[str]
|
|
816
|
-
request_tls_verify: Union[bool, str]
|
|
817
|
-
request_cert: Optional[RequestCert]
|
|
818
|
-
wait_for_schema: Optional[float]
|
|
819
|
-
rate_limit: Optional[str]
|
|
809
|
+
schema_location: str
|
|
810
|
+
app: Any
|
|
811
|
+
base_url: Optional[str]
|
|
812
|
+
validate_schema: bool
|
|
813
|
+
skip_deprecated_operations: bool
|
|
814
|
+
data_generation_methods: Tuple[DataGenerationMethod, ...]
|
|
815
|
+
force_schema_version: Optional[str]
|
|
816
|
+
request_tls_verify: Union[bool, str]
|
|
817
|
+
request_cert: Optional[RequestCert]
|
|
818
|
+
wait_for_schema: Optional[float]
|
|
819
|
+
rate_limit: Optional[str]
|
|
820
820
|
# Network request parameters
|
|
821
|
-
auth: Optional[Tuple[str, str]]
|
|
822
|
-
auth_type: Optional[str]
|
|
823
|
-
headers: Optional[Dict[str, str]]
|
|
821
|
+
auth: Optional[Tuple[str, str]]
|
|
822
|
+
auth_type: Optional[str]
|
|
823
|
+
headers: Optional[Dict[str, str]]
|
|
824
824
|
# Schema filters
|
|
825
|
-
endpoint: Optional[Filter]
|
|
826
|
-
method: Optional[Filter]
|
|
827
|
-
tag: Optional[Filter]
|
|
828
|
-
operation_id: Optional[Filter]
|
|
825
|
+
endpoint: Optional[Filter]
|
|
826
|
+
method: Optional[Filter]
|
|
827
|
+
tag: Optional[Filter]
|
|
828
|
+
operation_id: Optional[Filter]
|
|
829
829
|
|
|
830
830
|
|
|
831
831
|
def into_event_stream(
|
|
@@ -3,10 +3,10 @@ import json
|
|
|
3
3
|
import re
|
|
4
4
|
import sys
|
|
5
5
|
import threading
|
|
6
|
+
from dataclasses import dataclass, field
|
|
6
7
|
from queue import Queue
|
|
7
8
|
from typing import IO, Any, Dict, Generator, Iterator, List, Optional, cast
|
|
8
9
|
|
|
9
|
-
import attr
|
|
10
10
|
import click
|
|
11
11
|
import requests
|
|
12
12
|
from requests.cookies import RequestsCookieJar
|
|
@@ -25,7 +25,7 @@ from .handlers import EventHandler
|
|
|
25
25
|
WRITER_WORKER_JOIN_TIMEOUT = 1
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
@
|
|
28
|
+
@dataclass
|
|
29
29
|
class CassetteWriter(EventHandler):
|
|
30
30
|
"""Write interactions in a YAML cassette.
|
|
31
31
|
|
|
@@ -33,12 +33,12 @@ class CassetteWriter(EventHandler):
|
|
|
33
33
|
the end of the test run.
|
|
34
34
|
"""
|
|
35
35
|
|
|
36
|
-
file_handle: click.utils.LazyFile
|
|
37
|
-
preserve_exact_body_bytes: bool
|
|
38
|
-
queue: Queue =
|
|
39
|
-
worker: threading.Thread =
|
|
36
|
+
file_handle: click.utils.LazyFile
|
|
37
|
+
preserve_exact_body_bytes: bool
|
|
38
|
+
queue: Queue = field(default_factory=Queue)
|
|
39
|
+
worker: threading.Thread = field(init=False)
|
|
40
40
|
|
|
41
|
-
def
|
|
41
|
+
def __post_init__(self) -> None:
|
|
42
42
|
self.worker = threading.Thread(
|
|
43
43
|
target=worker,
|
|
44
44
|
kwargs={
|
|
@@ -80,23 +80,23 @@ class CassetteWriter(EventHandler):
|
|
|
80
80
|
self.worker.join(WRITER_WORKER_JOIN_TIMEOUT)
|
|
81
81
|
|
|
82
82
|
|
|
83
|
-
@
|
|
83
|
+
@dataclass
|
|
84
84
|
class Initialize:
|
|
85
85
|
"""Start up, the first message to make preparations before proceeding the input data."""
|
|
86
86
|
|
|
87
87
|
|
|
88
|
-
@
|
|
88
|
+
@dataclass
|
|
89
89
|
class Process:
|
|
90
90
|
"""A new chunk of data should be processed."""
|
|
91
91
|
|
|
92
|
-
seed: int
|
|
93
|
-
correlation_id: str
|
|
94
|
-
thread_id: int
|
|
95
|
-
data_generation_method: constants.DataGenerationMethod
|
|
96
|
-
interactions: List[SerializedInteraction]
|
|
92
|
+
seed: int
|
|
93
|
+
correlation_id: str
|
|
94
|
+
thread_id: int
|
|
95
|
+
data_generation_method: constants.DataGenerationMethod
|
|
96
|
+
interactions: List[SerializedInteraction]
|
|
97
97
|
|
|
98
98
|
|
|
99
|
-
@
|
|
99
|
+
@dataclass
|
|
100
100
|
class Finalize:
|
|
101
101
|
"""The work is done and there will be no more messages to process."""
|
|
102
102
|
|
|
@@ -274,10 +274,10 @@ def write_double_quoted(stream: IO, text: str) -> None:
|
|
|
274
274
|
stream.write('"')
|
|
275
275
|
|
|
276
276
|
|
|
277
|
-
@
|
|
277
|
+
@dataclass
|
|
278
278
|
class Replayed:
|
|
279
|
-
interaction: Dict[str, Any]
|
|
280
|
-
response: requests.Response
|
|
279
|
+
interaction: Dict[str, Any]
|
|
280
|
+
response: requests.Response
|
|
281
281
|
|
|
282
282
|
|
|
283
283
|
def replay(
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import shutil
|
|
3
|
+
from dataclasses import dataclass, field
|
|
4
|
+
from queue import Queue
|
|
5
|
+
from typing import List, Optional, Union
|
|
6
|
+
|
|
7
|
+
import hypothesis
|
|
8
|
+
|
|
9
|
+
from ..constants import CodeSampleStyle
|
|
10
|
+
from ..runner.serialization import SerializedTestResult
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
@dataclass
|
|
14
|
+
class ServiceReportContext:
|
|
15
|
+
queue: Queue
|
|
16
|
+
service_base_url: str
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
@dataclass
|
|
20
|
+
class FileReportContext:
|
|
21
|
+
queue: Queue
|
|
22
|
+
filename: Optional[str] = None
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
@dataclass
|
|
26
|
+
class ExecutionContext:
|
|
27
|
+
"""Storage for the current context of the execution."""
|
|
28
|
+
|
|
29
|
+
hypothesis_settings: hypothesis.settings
|
|
30
|
+
hypothesis_output: List[str] = field(default_factory=list)
|
|
31
|
+
workers_num: int = 1
|
|
32
|
+
rate_limit: Optional[str] = None
|
|
33
|
+
show_errors_tracebacks: bool = False
|
|
34
|
+
validate_schema: bool = True
|
|
35
|
+
operations_processed: int = 0
|
|
36
|
+
# It is set in runtime, from a `Initialized` event
|
|
37
|
+
operations_count: Optional[int] = None
|
|
38
|
+
current_line_length: int = 0
|
|
39
|
+
terminal_size: os.terminal_size = field(default_factory=shutil.get_terminal_size)
|
|
40
|
+
results: List[SerializedTestResult] = field(default_factory=list)
|
|
41
|
+
cassette_path: Optional[str] = None
|
|
42
|
+
junit_xml_file: Optional[str] = None
|
|
43
|
+
is_interrupted: bool = False
|
|
44
|
+
verbosity: int = 0
|
|
45
|
+
code_sample_style: CodeSampleStyle = CodeSampleStyle.default()
|
|
46
|
+
report: Optional[Union[ServiceReportContext, FileReportContext]] = None
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import json
|
|
2
|
+
from dataclasses import dataclass
|
|
2
3
|
|
|
3
|
-
import attr
|
|
4
4
|
from click.utils import LazyFile
|
|
5
5
|
|
|
6
6
|
from ..runner import events
|
|
7
7
|
from .handlers import EventHandler, ExecutionContext
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
@
|
|
10
|
+
@dataclass
|
|
11
11
|
class DebugOutputHandler(EventHandler):
|
|
12
|
-
file_handle: LazyFile
|
|
12
|
+
file_handle: LazyFile
|
|
13
13
|
|
|
14
14
|
def handle_event(self, context: ExecutionContext, event: events.ExecutionEvent) -> None:
|
|
15
15
|
stream = self.file_handle.open()
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import platform
|
|
2
|
+
from dataclasses import dataclass, field
|
|
2
3
|
from typing import List
|
|
3
4
|
|
|
4
|
-
import attr
|
|
5
5
|
from click.utils import LazyFile
|
|
6
6
|
from junit_xml import TestCase, TestSuite, to_xml_report_file
|
|
7
7
|
|
|
@@ -11,10 +11,10 @@ from ..runner.serialization import deduplicate_failures
|
|
|
11
11
|
from .handlers import EventHandler, ExecutionContext
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
@
|
|
14
|
+
@dataclass
|
|
15
15
|
class JunitXMLHandler(EventHandler):
|
|
16
|
-
file_handle: LazyFile
|
|
17
|
-
test_cases: List =
|
|
16
|
+
file_handle: LazyFile
|
|
17
|
+
test_cases: List = field(default_factory=list)
|
|
18
18
|
|
|
19
19
|
def handle_event(self, context: ExecutionContext, event: events.ExecutionEvent) -> None:
|
|
20
20
|
if isinstance(event, events.AfterExecution):
|
|
@@ -20,9 +20,9 @@ SCHEMATHESIS_TEST_CASE_HEADER = "X-Schemathesis-TestCaseId"
|
|
|
20
20
|
HYPOTHESIS_IN_MEMORY_DATABASE_IDENTIFIER = ":memory:"
|
|
21
21
|
DISCORD_LINK = "https://discord.gg/R9ASRAmHnA"
|
|
22
22
|
# Maximum test running time
|
|
23
|
-
DEFAULT_DEADLINE = 15000
|
|
24
|
-
DEFAULT_RESPONSE_TIMEOUT = 10000
|
|
25
|
-
DEFAULT_STATEFUL_RECURSION_LIMIT = 5
|
|
23
|
+
DEFAULT_DEADLINE = 15000
|
|
24
|
+
DEFAULT_RESPONSE_TIMEOUT = 10000
|
|
25
|
+
DEFAULT_STATEFUL_RECURSION_LIMIT = 5
|
|
26
26
|
HTTP_METHODS = frozenset({"get", "put", "post", "delete", "options", "head", "patch", "trace"})
|
|
27
27
|
RECURSIVE_REFERENCE_ERROR_MESSAGE = (
|
|
28
28
|
"Currently, Schemathesis can't generate data for this operation due to "
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
from dataclasses import dataclass
|
|
1
2
|
from hashlib import sha1
|
|
2
3
|
from json import JSONDecodeError
|
|
3
4
|
from typing import TYPE_CHECKING, Any, Callable, Dict, Generator, List, NoReturn, Optional, Tuple, Type, Union
|
|
4
5
|
|
|
5
|
-
import attr
|
|
6
6
|
import hypothesis.errors
|
|
7
7
|
import requests
|
|
8
8
|
from jsonschema import ValidationError
|
|
@@ -139,15 +139,15 @@ def get_timeout_error(deadline: Union[float, int]) -> Type[CheckFailed]:
|
|
|
139
139
|
return _get_hashed_exception("TimeoutError", str(deadline))
|
|
140
140
|
|
|
141
141
|
|
|
142
|
-
@
|
|
142
|
+
@dataclass
|
|
143
143
|
class InvalidSchema(Exception):
|
|
144
144
|
"""Schema associated with an API operation contains an error."""
|
|
145
145
|
|
|
146
146
|
__module__ = "builtins"
|
|
147
|
-
message: Optional[str] =
|
|
148
|
-
path: Optional[str] =
|
|
149
|
-
method: Optional[str] =
|
|
150
|
-
full_path: Optional[str] =
|
|
147
|
+
message: Optional[str] = None
|
|
148
|
+
path: Optional[str] = None
|
|
149
|
+
method: Optional[str] = None
|
|
150
|
+
full_path: Optional[str] = None
|
|
151
151
|
|
|
152
152
|
def as_failing_test_function(self) -> Callable:
|
|
153
153
|
"""Create a test function that will fail.
|
|
@@ -233,10 +233,10 @@ class InvalidRegularExpression(Exception):
|
|
|
233
233
|
__module__ = "builtins"
|
|
234
234
|
|
|
235
235
|
|
|
236
|
-
@
|
|
236
|
+
@dataclass
|
|
237
237
|
class HTTPError(Exception):
|
|
238
|
-
response: "GenericResponse"
|
|
239
|
-
url: str
|
|
238
|
+
response: "GenericResponse"
|
|
239
|
+
url: str
|
|
240
240
|
|
|
241
241
|
@classmethod
|
|
242
242
|
def raise_for_status(cls, response: requests.Response) -> None:
|
|
@@ -222,7 +222,7 @@ def skip_unnecessary_hypothesis_output() -> Generator:
|
|
|
222
222
|
yield
|
|
223
223
|
|
|
224
224
|
|
|
225
|
-
@hookimpl(hookwrapper=True)
|
|
225
|
+
@hookimpl(hookwrapper=True)
|
|
226
226
|
def pytest_pyfunc_call(pyfuncitem): # type:ignore
|
|
227
227
|
"""It is possible to have a Hypothesis exception in runtime.
|
|
228
228
|
|