schemathesis 3.25.6__py3-none-any.whl → 3.39.7__py3-none-any.whl

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.
Files changed (146) hide show
  1. schemathesis/__init__.py +6 -6
  2. schemathesis/_compat.py +2 -2
  3. schemathesis/_dependency_versions.py +4 -2
  4. schemathesis/_hypothesis.py +369 -56
  5. schemathesis/_lazy_import.py +1 -0
  6. schemathesis/_override.py +5 -4
  7. schemathesis/_patches.py +21 -0
  8. schemathesis/_rate_limiter.py +7 -0
  9. schemathesis/_xml.py +75 -22
  10. schemathesis/auths.py +78 -16
  11. schemathesis/checks.py +21 -9
  12. schemathesis/cli/__init__.py +783 -432
  13. schemathesis/cli/__main__.py +4 -0
  14. schemathesis/cli/callbacks.py +58 -13
  15. schemathesis/cli/cassettes.py +233 -47
  16. schemathesis/cli/constants.py +8 -2
  17. schemathesis/cli/context.py +22 -5
  18. schemathesis/cli/debug.py +2 -1
  19. schemathesis/cli/handlers.py +4 -1
  20. schemathesis/cli/junitxml.py +103 -22
  21. schemathesis/cli/options.py +15 -4
  22. schemathesis/cli/output/default.py +258 -112
  23. schemathesis/cli/output/short.py +23 -8
  24. schemathesis/cli/reporting.py +79 -0
  25. schemathesis/cli/sanitization.py +6 -0
  26. schemathesis/code_samples.py +5 -3
  27. schemathesis/constants.py +1 -0
  28. schemathesis/contrib/openapi/__init__.py +1 -1
  29. schemathesis/contrib/openapi/fill_missing_examples.py +3 -1
  30. schemathesis/contrib/openapi/formats/uuid.py +2 -1
  31. schemathesis/contrib/unique_data.py +3 -3
  32. schemathesis/exceptions.py +76 -65
  33. schemathesis/experimental/__init__.py +35 -0
  34. schemathesis/extra/_aiohttp.py +1 -0
  35. schemathesis/extra/_flask.py +4 -1
  36. schemathesis/extra/_server.py +1 -0
  37. schemathesis/extra/pytest_plugin.py +17 -25
  38. schemathesis/failures.py +77 -9
  39. schemathesis/filters.py +185 -8
  40. schemathesis/fixups/__init__.py +1 -0
  41. schemathesis/fixups/fast_api.py +2 -2
  42. schemathesis/fixups/utf8_bom.py +1 -2
  43. schemathesis/generation/__init__.py +20 -36
  44. schemathesis/generation/_hypothesis.py +59 -0
  45. schemathesis/generation/_methods.py +44 -0
  46. schemathesis/generation/coverage.py +931 -0
  47. schemathesis/graphql.py +0 -1
  48. schemathesis/hooks.py +89 -12
  49. schemathesis/internal/checks.py +84 -0
  50. schemathesis/internal/copy.py +22 -3
  51. schemathesis/internal/deprecation.py +6 -2
  52. schemathesis/internal/diff.py +15 -0
  53. schemathesis/internal/extensions.py +27 -0
  54. schemathesis/internal/jsonschema.py +2 -1
  55. schemathesis/internal/output.py +68 -0
  56. schemathesis/internal/result.py +1 -1
  57. schemathesis/internal/transformation.py +11 -0
  58. schemathesis/lazy.py +138 -25
  59. schemathesis/loaders.py +7 -5
  60. schemathesis/models.py +318 -211
  61. schemathesis/parameters.py +4 -0
  62. schemathesis/runner/__init__.py +50 -15
  63. schemathesis/runner/events.py +65 -5
  64. schemathesis/runner/impl/context.py +104 -0
  65. schemathesis/runner/impl/core.py +388 -177
  66. schemathesis/runner/impl/solo.py +19 -29
  67. schemathesis/runner/impl/threadpool.py +70 -79
  68. schemathesis/runner/probes.py +11 -9
  69. schemathesis/runner/serialization.py +150 -17
  70. schemathesis/sanitization.py +5 -1
  71. schemathesis/schemas.py +170 -102
  72. schemathesis/serializers.py +7 -2
  73. schemathesis/service/ci.py +1 -0
  74. schemathesis/service/client.py +39 -6
  75. schemathesis/service/events.py +5 -1
  76. schemathesis/service/extensions.py +224 -0
  77. schemathesis/service/hosts.py +6 -2
  78. schemathesis/service/metadata.py +25 -0
  79. schemathesis/service/models.py +211 -2
  80. schemathesis/service/report.py +6 -6
  81. schemathesis/service/serialization.py +45 -71
  82. schemathesis/service/usage.py +1 -0
  83. schemathesis/specs/graphql/_cache.py +26 -0
  84. schemathesis/specs/graphql/loaders.py +25 -5
  85. schemathesis/specs/graphql/nodes.py +1 -0
  86. schemathesis/specs/graphql/scalars.py +2 -2
  87. schemathesis/specs/graphql/schemas.py +130 -100
  88. schemathesis/specs/graphql/validation.py +1 -2
  89. schemathesis/specs/openapi/__init__.py +1 -0
  90. schemathesis/specs/openapi/_cache.py +123 -0
  91. schemathesis/specs/openapi/_hypothesis.py +78 -60
  92. schemathesis/specs/openapi/checks.py +504 -25
  93. schemathesis/specs/openapi/converter.py +31 -4
  94. schemathesis/specs/openapi/definitions.py +10 -17
  95. schemathesis/specs/openapi/examples.py +126 -12
  96. schemathesis/specs/openapi/expressions/__init__.py +37 -2
  97. schemathesis/specs/openapi/expressions/context.py +1 -1
  98. schemathesis/specs/openapi/expressions/extractors.py +26 -0
  99. schemathesis/specs/openapi/expressions/lexer.py +20 -18
  100. schemathesis/specs/openapi/expressions/nodes.py +29 -6
  101. schemathesis/specs/openapi/expressions/parser.py +26 -5
  102. schemathesis/specs/openapi/formats.py +44 -0
  103. schemathesis/specs/openapi/links.py +125 -42
  104. schemathesis/specs/openapi/loaders.py +77 -36
  105. schemathesis/specs/openapi/media_types.py +34 -0
  106. schemathesis/specs/openapi/negative/__init__.py +6 -3
  107. schemathesis/specs/openapi/negative/mutations.py +21 -6
  108. schemathesis/specs/openapi/parameters.py +39 -25
  109. schemathesis/specs/openapi/patterns.py +137 -0
  110. schemathesis/specs/openapi/references.py +37 -7
  111. schemathesis/specs/openapi/schemas.py +360 -241
  112. schemathesis/specs/openapi/security.py +25 -7
  113. schemathesis/specs/openapi/serialization.py +1 -0
  114. schemathesis/specs/openapi/stateful/__init__.py +198 -70
  115. schemathesis/specs/openapi/stateful/statistic.py +198 -0
  116. schemathesis/specs/openapi/stateful/types.py +14 -0
  117. schemathesis/specs/openapi/utils.py +6 -1
  118. schemathesis/specs/openapi/validation.py +1 -0
  119. schemathesis/stateful/__init__.py +35 -21
  120. schemathesis/stateful/config.py +97 -0
  121. schemathesis/stateful/context.py +135 -0
  122. schemathesis/stateful/events.py +274 -0
  123. schemathesis/stateful/runner.py +309 -0
  124. schemathesis/stateful/sink.py +68 -0
  125. schemathesis/stateful/state_machine.py +67 -38
  126. schemathesis/stateful/statistic.py +22 -0
  127. schemathesis/stateful/validation.py +100 -0
  128. schemathesis/targets.py +33 -1
  129. schemathesis/throttling.py +25 -5
  130. schemathesis/transports/__init__.py +354 -0
  131. schemathesis/transports/asgi.py +7 -0
  132. schemathesis/transports/auth.py +25 -2
  133. schemathesis/transports/content_types.py +3 -1
  134. schemathesis/transports/headers.py +2 -1
  135. schemathesis/transports/responses.py +9 -4
  136. schemathesis/types.py +9 -0
  137. schemathesis/utils.py +11 -16
  138. schemathesis-3.39.7.dist-info/METADATA +293 -0
  139. schemathesis-3.39.7.dist-info/RECORD +160 -0
  140. {schemathesis-3.25.6.dist-info → schemathesis-3.39.7.dist-info}/WHEEL +1 -1
  141. schemathesis/specs/openapi/filters.py +0 -49
  142. schemathesis/specs/openapi/stateful/links.py +0 -92
  143. schemathesis-3.25.6.dist-info/METADATA +0 -356
  144. schemathesis-3.25.6.dist-info/RECORD +0 -134
  145. {schemathesis-3.25.6.dist-info → schemathesis-3.39.7.dist-info}/entry_points.txt +0 -0
  146. {schemathesis-3.25.6.dist-info → schemathesis-3.39.7.dist-info}/licenses/LICENSE +0 -0
schemathesis/utils.py CHANGED
@@ -1,10 +1,10 @@
1
1
  from __future__ import annotations
2
- import functools
3
- import operator
2
+
4
3
  from contextlib import contextmanager
5
4
  from inspect import getfullargspec
6
5
  from pathlib import Path
7
6
  from typing import (
7
+ TYPE_CHECKING,
8
8
  Any,
9
9
  Callable,
10
10
  Generator,
@@ -13,7 +13,6 @@ from typing import (
13
13
  )
14
14
 
15
15
  import pytest
16
- from hypothesis import strategies as st
17
16
  from hypothesis.core import is_invalid_test
18
17
  from hypothesis.reporting import with_reporter
19
18
  from hypothesis.strategies import SearchStrategy
@@ -21,9 +20,10 @@ from hypothesis.strategies import SearchStrategy
21
20
  from ._compat import InferType, get_signature
22
21
 
23
22
  # Backward-compat
24
- from .constants import NOT_SET # noqa: F401
25
23
  from .exceptions import SkipTest, UsageError
26
- from .types import GenericTest, PathLike
24
+
25
+ if TYPE_CHECKING:
26
+ from .types import GenericTest, PathLike
27
27
 
28
28
 
29
29
  def is_schemathesis_test(func: Callable) -> bool:
@@ -142,18 +142,13 @@ def validate_given_args(func: GenericTest, args: tuple, kwargs: dict[str, Any])
142
142
  def compose(*functions: Callable) -> Callable:
143
143
  """Compose multiple functions into a single one."""
144
144
 
145
- def noop(x: Any) -> Any:
146
- return x
147
-
148
- return functools.reduce(lambda f, g: lambda x: f(g(x)), functions, noop)
145
+ def composed(x: Any) -> Any:
146
+ result = x
147
+ for func in reversed(functions):
148
+ result = func(result)
149
+ return result
149
150
 
150
-
151
- def combine_strategies(strategies: list[st.SearchStrategy]) -> st.SearchStrategy:
152
- """Combine a list of strategies into a single one.
153
-
154
- If the input is `[a, b, c]`, then the result is equivalent to `a | b | c`.
155
- """
156
- return functools.reduce(operator.or_, strategies[1:], strategies[0])
151
+ return composed
157
152
 
158
153
 
159
154
  def skip(operation_name: str) -> NoReturn:
@@ -0,0 +1,293 @@
1
+ Metadata-Version: 2.4
2
+ Name: schemathesis
3
+ Version: 3.39.7
4
+ Summary: Property-based testing framework for Open API and GraphQL based apps
5
+ Project-URL: Documentation, https://schemathesis.readthedocs.io/en/stable/
6
+ Project-URL: Changelog, https://schemathesis.readthedocs.io/en/stable/changelog.html
7
+ Project-URL: Bug Tracker, https://github.com/schemathesis/schemathesis
8
+ Project-URL: Funding, https://github.com/sponsors/Stranger6667
9
+ Project-URL: Source Code, https://github.com/schemathesis/schemathesis
10
+ Author-email: Dmitry Dygalo <dmitry@dygalo.dev>
11
+ Maintainer-email: Dmitry Dygalo <dmitry@dygalo.dev>
12
+ License-Expression: MIT
13
+ License-File: LICENSE
14
+ Keywords: graphql,hypothesis,openapi,pytest,testing
15
+ Classifier: Development Status :: 5 - Production/Stable
16
+ Classifier: Environment :: Console
17
+ Classifier: Framework :: Hypothesis
18
+ Classifier: Framework :: Pytest
19
+ Classifier: Intended Audience :: Developers
20
+ Classifier: License :: OSI Approved :: MIT License
21
+ Classifier: Operating System :: OS Independent
22
+ Classifier: Programming Language :: Python :: 3 :: Only
23
+ Classifier: Programming Language :: Python :: 3.8
24
+ Classifier: Programming Language :: Python :: 3.9
25
+ Classifier: Programming Language :: Python :: 3.10
26
+ Classifier: Programming Language :: Python :: 3.11
27
+ Classifier: Programming Language :: Python :: 3.12
28
+ Classifier: Programming Language :: Python :: 3.13
29
+ Classifier: Programming Language :: Python :: Implementation :: CPython
30
+ Classifier: Topic :: Software Development :: Testing
31
+ Requires-Python: >=3.8
32
+ Requires-Dist: backoff<3.0,>=2.1.2
33
+ Requires-Dist: click<9.0,>=7.0
34
+ Requires-Dist: colorama<1.0,>=0.4
35
+ Requires-Dist: harfile<1.0,>=0.3.0
36
+ Requires-Dist: httpx<1.0,>=0.22.0
37
+ Requires-Dist: hypothesis-graphql<1,>=0.11.1
38
+ Requires-Dist: hypothesis-jsonschema<0.24,>=0.23.1
39
+ Requires-Dist: hypothesis<7,>=6.103.4; python_version > '3.8'
40
+ Requires-Dist: hypothesis[zoneinfo]<7,>=6.103.4; python_version == '3.8'
41
+ Requires-Dist: jsonschema[format]<5.0,>=4.18.0
42
+ Requires-Dist: junit-xml<2.0,>=1.9
43
+ Requires-Dist: pyrate-limiter<4.0,>=2.10
44
+ Requires-Dist: pytest-subtests<0.15.0,>=0.2.1
45
+ Requires-Dist: pytest<9,>=4.6.4
46
+ Requires-Dist: pyyaml<7.0,>=5.1
47
+ Requires-Dist: requests<3,>=2.22
48
+ Requires-Dist: starlette-testclient<1,>=0.4.1
49
+ Requires-Dist: starlette<1,>=0.13
50
+ Requires-Dist: tomli-w<2.0,>=1.0.0
51
+ Requires-Dist: tomli<3.0,>=2.0.1
52
+ Requires-Dist: werkzeug<4,>=0.16.0
53
+ Requires-Dist: yarl<2.0,>=1.5
54
+ Provides-Extra: bench
55
+ Requires-Dist: pytest-codspeed==2.2.1; extra == 'bench'
56
+ Provides-Extra: cov
57
+ Requires-Dist: coverage-enable-subprocess; extra == 'cov'
58
+ Requires-Dist: coverage[toml]>=5.3; extra == 'cov'
59
+ Provides-Extra: dev
60
+ Requires-Dist: aiohttp<4.0,>=3.9.1; extra == 'dev'
61
+ Requires-Dist: coverage-enable-subprocess; extra == 'dev'
62
+ Requires-Dist: coverage>=6; extra == 'dev'
63
+ Requires-Dist: coverage[toml]>=5.3; extra == 'dev'
64
+ Requires-Dist: fastapi>=0.86.0; extra == 'dev'
65
+ Requires-Dist: flask<3.0,>=2.1.1; extra == 'dev'
66
+ Requires-Dist: hypothesis-openapi<1,>=0.2; (python_version >= '3.10') and extra == 'dev'
67
+ Requires-Dist: pydantic>=1.10.2; extra == 'dev'
68
+ Requires-Dist: pytest-asyncio<1.0,>=0.18.0; extra == 'dev'
69
+ Requires-Dist: pytest-codspeed==2.2.1; extra == 'dev'
70
+ Requires-Dist: pytest-httpserver<2.0,>=1.0; extra == 'dev'
71
+ Requires-Dist: pytest-mock<4.0,>=3.7.0; extra == 'dev'
72
+ Requires-Dist: pytest-trio<1.0,>=0.8; extra == 'dev'
73
+ Requires-Dist: pytest-xdist<4.0,>=3; extra == 'dev'
74
+ Requires-Dist: sphinx; extra == 'dev'
75
+ Requires-Dist: sphinx-click; extra == 'dev'
76
+ Requires-Dist: sphinx-rtd-theme; extra == 'dev'
77
+ Requires-Dist: strawberry-graphql[fastapi]>=0.109.0; extra == 'dev'
78
+ Requires-Dist: syrupy<5.0,>=2; extra == 'dev'
79
+ Requires-Dist: trustme<1.0,>=0.9.0; extra == 'dev'
80
+ Provides-Extra: docs
81
+ Requires-Dist: sphinx; extra == 'docs'
82
+ Requires-Dist: sphinx-click; extra == 'docs'
83
+ Requires-Dist: sphinx-rtd-theme; extra == 'docs'
84
+ Provides-Extra: tests
85
+ Requires-Dist: aiohttp<4.0,>=3.9.1; extra == 'tests'
86
+ Requires-Dist: coverage>=6; extra == 'tests'
87
+ Requires-Dist: fastapi>=0.86.0; extra == 'tests'
88
+ Requires-Dist: flask<3.0,>=2.1.1; extra == 'tests'
89
+ Requires-Dist: hypothesis-openapi<1,>=0.2; (python_version >= '3.10') and extra == 'tests'
90
+ Requires-Dist: pydantic>=1.10.2; extra == 'tests'
91
+ Requires-Dist: pytest-asyncio<1.0,>=0.18.0; extra == 'tests'
92
+ Requires-Dist: pytest-httpserver<2.0,>=1.0; extra == 'tests'
93
+ Requires-Dist: pytest-mock<4.0,>=3.7.0; extra == 'tests'
94
+ Requires-Dist: pytest-trio<1.0,>=0.8; extra == 'tests'
95
+ Requires-Dist: pytest-xdist<4.0,>=3; extra == 'tests'
96
+ Requires-Dist: strawberry-graphql[fastapi]>=0.109.0; extra == 'tests'
97
+ Requires-Dist: syrupy<5.0,>=2; extra == 'tests'
98
+ Requires-Dist: trustme<1.0,>=0.9.0; extra == 'tests'
99
+ Description-Content-Type: text/markdown
100
+
101
+ <p align="center">
102
+ <a href="https://github.com/schemathesis/schemathesis/actions" target="_blank">
103
+ <img src="https://github.com/schemathesis/schemathesis/actions/workflows/build.yml/badge.svg" alt="Build">
104
+ </a>
105
+ <a href="https://codecov.io/gh/schemathesis/schemathesis/branch/master" target="_blank">
106
+ <img src="https://codecov.io/gh/schemathesis/schemathesis/branch/master/graph/badge.svg" alt="Coverage">
107
+ </a>
108
+ <a href="https://pypi.org/project/schemathesis/" target="_blank">
109
+ <img src="https://img.shields.io/pypi/v/schemathesis.svg" alt="Version">
110
+ </a>
111
+ <a href="https://pypi.org/project/schemathesis/" target="_blank">
112
+ <img src="https://img.shields.io/pypi/pyversions/schemathesis.svg" alt="Python versions">
113
+ </a>
114
+ <a href="https://discord.gg/R9ASRAmHnA" target="_blank">
115
+ <img src="https://img.shields.io/discord/938139740912369755" alt="Discord">
116
+ </a>
117
+ <a href="https://opensource.org/licenses/MIT" target="_blank">
118
+ <img src="https://img.shields.io/pypi/l/schemathesis.svg" alt="License">
119
+ </a>
120
+ </p>
121
+
122
+ ## Schemathesis
123
+
124
+ Schemathesis is an API testing tool that automatically finds crashes and validates spec compliance.
125
+
126
+ <p align="center">
127
+ <img src="https://raw.githubusercontent.com/schemathesis/schemathesis/master/img/demo.gif" alt="Schemathesis Demo"/>
128
+ </p>
129
+
130
+ <p align="center">
131
+ <i>Finding server crashes in the Demo API.</i>
132
+ </p>
133
+
134
+ ### Highlights
135
+
136
+ 🎯 **Catches Hard-to-Find Bugs**
137
+
138
+ - Uncover hidden crashes and edge cases that manual testing might miss
139
+ - Identify spec violations and ensure your API adheres to its contract
140
+
141
+ ⚡ **Accelerates Testing Cycles**
142
+
143
+ - Automatically generate a wide range of test cases based on your API schema
144
+ - Save time by reducing the need for manual test case creation
145
+
146
+ 🧩 **Integrates Seamlessly**
147
+
148
+ - Works with popular API formats such as OpenAPI, GraphQL.
149
+ - Easily integrate into your existing CI/CD workflows.
150
+
151
+ 🔧 **Customizable and Extendable**
152
+
153
+ - Tune the testing process using Python extensions.
154
+ - Adjust the testing flow to suit your needs with rich configuration options.
155
+
156
+ 🐞 **Simplifies Debugging**
157
+
158
+ - Get detailed reports to identify and fix issues quickly.
159
+ - Reproduce failing test cases with cURL commands.
160
+
161
+ 🔬 **Proven by Research**
162
+
163
+ - Validated through academic studies on API testing automation
164
+ - Featured in [ICSE 2022 paper](https://ieeexplore.ieee.org/document/9793781) on semantics-aware fuzzing
165
+ - Recognized in [ACM survey](https://dl.acm.org/doi/10.1145/3617175) as state-of-the-art RESTful API testing tool
166
+
167
+ ## Installation
168
+
169
+ Use Schemathesis via Docker, or install it from [PyPI](https://pypi.org/project/schemathesis/)
170
+
171
+ ```console
172
+ # Via Docker.
173
+ $ docker pull schemathesis/schemathesis:stable
174
+
175
+ # With pip.
176
+ $ pip install schemathesis
177
+ ```
178
+
179
+ ## Getting Started
180
+
181
+ Schemathesis works as a standalone CLI:
182
+
183
+ ```console
184
+ docker run schemathesis/schemathesis:stable
185
+ run --checks all https://example.schemathesis.io/openapi.json
186
+ # Or when installed with pip
187
+ schemathesis run --checks all https://example.schemathesis.io/openapi.json
188
+ ```
189
+
190
+ Or a Python library:
191
+
192
+ ```python
193
+ import schemathesis
194
+
195
+ schema = schemathesis.from_uri("https://example.schemathesis.io/openapi.json")
196
+
197
+
198
+ @schema.parametrize()
199
+ def test_api(case):
200
+ case.call_and_validate()
201
+ ```
202
+
203
+ See a complete working example project in the [/example](https://github.com/schemathesis/schemathesis/tree/master/example) directory.
204
+
205
+ Schemathesis can be easily integrated into your CI/CD pipeline using GitHub Actions. Add this block to your GitHub Actions to run Schemathesis against your API:
206
+
207
+ ```yaml
208
+ api-tests:
209
+ runs-on: ubuntu-latest
210
+ steps:
211
+ - uses: schemathesis/action@v1
212
+ with:
213
+ schema: "https://example.schemathesis.io/openapi.json"
214
+ ```
215
+
216
+ For more details, check out our [GitHub Action](https://github.com/schemathesis/action) repository or see our [GitHub Tutorial](https://docs.schemathesis.io/tutorials/github).
217
+
218
+ ## Who's Using Schemathesis?
219
+
220
+ Schemathesis is used by a number of projects and companies, including direct usage or integration into other tools:
221
+
222
+ - Abstract Machines ([Magistrala](https://github.com/absmach/magistrala))
223
+ - Bundesstelle für Open Data ([smard-api](https://github.com/bundesAPI/smard-api))
224
+ - [CheckMK](https://github.com/Checkmk/checkmk)
225
+ - Chronosphere.io ([Calyptia](https://github.com/chronosphereio/calyptia-api))
226
+ - HXSecurity ([DongTai](https://github.com/HXSecurity/DongTai))
227
+ - Netflix ([Dispatch](https://github.com/Netflix/dispatch))
228
+ - [Pixie](https://github.com/pixie-io/pixie)
229
+ - [Qdrant](https://github.com/qdrant/qdrant)
230
+ - Spotify ([Backstage](https://github.com/backstage/backstage))
231
+ - [Weechat](https://github.com/weechat/weechat)
232
+ - WordPress ([OpenVerse](https://github.com/WordPress/openverse))
233
+
234
+ ## Testimonials
235
+
236
+ "_The world needs modern, spec-based API tests, so we can deliver APIs as-designed. Schemathesis is the right tool for that job._"
237
+
238
+ <div>Emmanuel Paraskakis - <strong>Level 250</strong></div>
239
+
240
+ ---
241
+
242
+ "_Schemathesis is the only sane way to thoroughly test an API._"
243
+
244
+ <div>Zdenek Nemec - <strong>superface.ai</strong></div>
245
+
246
+ ---
247
+
248
+ "_The tool is absolutely amazing as it can do the negative scenario testing instead of me and much faster! Before I was doing the same tests in Postman client. But it's much slower and brings maintenance burden._"
249
+
250
+ <div>Luděk Nový - <strong>JetBrains</strong></div>
251
+
252
+ ---
253
+
254
+ "_Schemathesis is the best tool for fuzz testing of REST API on the market. We are at Red Hat use it for examining our applications in functional and integrations testing levels._"
255
+
256
+ <div>Dmitry Misharov - <strong>RedHat</strong></div>
257
+
258
+ ---
259
+
260
+ "_There are different levels of usability and documentation quality among these tools which have been reported, where Schemathesis clearly stands out among the most user-friendly and industry-strength tools._"
261
+
262
+ <div>Testing RESTful APIs: A Survey - <strong>a research paper by Golmohammadi, at al</strong></div>
263
+
264
+ ---
265
+
266
+ ## Contributing
267
+
268
+ We welcome contributions in code and are especially interested in learning about your use cases. Your input is essential for improving Schemathesis and directly influences future updates.
269
+
270
+ ### How to Contribute
271
+
272
+ 1. Discuss ideas and questions through [GitHub issues](https://github.com/schemathesis/schemathesis/issues) or on our [Discord channel](https://discord.gg/R9ASRAmHnA).
273
+ 2. For code contributions, see our [contributing guidelines](https://github.com/schemathesis/schemathesis/blob/master/CONTRIBUTING.rst).
274
+ 3. Share your experience and thoughts using [this feedback form](https://forms.gle/kJ4hSxc1Yp6Ga96t5).
275
+
276
+ ### Why Your Input Matters
277
+
278
+ - Enables us to develop useful features and fix bugs faster
279
+ - Improves our test suite and documentation
280
+
281
+ Thank you for contributing to making Schemathesis better! 👍
282
+
283
+ ## Get in Touch
284
+
285
+ If you need assistance with integrating Schemathesis into your workflows or have specific questions, feel free to reach out at <a href="mailto:support@schemathesis.io">support@schemathesis.io</a>.
286
+
287
+ ## Acknowledgements
288
+
289
+ Schemathesis is built on top of <a href="https://hypothesis.works/" target="_blank">Hypothesis</a>, a powerful property-based testing library for Python.
290
+
291
+ ## License
292
+
293
+ This project is licensed under the terms of the [MIT license](https://opensource.org/licenses/MIT).
@@ -0,0 +1,160 @@
1
+ schemathesis/__init__.py,sha256=UW2Bq8hDDkcBeAAA7PzpBFXkOOxkmHox-mfQwzHDjL0,1914
2
+ schemathesis/_compat.py,sha256=y4RZd59i2NCnZ91VQhnKeMn_8t3SgvLOk2Xm8nymUHY,1837
3
+ schemathesis/_dependency_versions.py,sha256=pjEkkGAfOQJYNb-9UOo84V8nj_lKHr_TGDVdFwY2UU0,816
4
+ schemathesis/_hypothesis.py,sha256=SIacOZAi1phnTNFtPf7dHSuZQ3r5hDyOH8UOzEdk6AE,24423
5
+ schemathesis/_lazy_import.py,sha256=aMhWYgbU2JOltyWBb32vnWBb6kykOghucEzI_F70yVE,470
6
+ schemathesis/_override.py,sha256=TAjYB3eJQmlw9K_xiR9ptt9Wj7if4U7UFlUhGjpBAoM,1625
7
+ schemathesis/_patches.py,sha256=Hsbpn4UVeXUQD2Kllrbq01CSWsTYENWa0VJTyhX5C2k,895
8
+ schemathesis/_rate_limiter.py,sha256=q_XWst5hzuAyXQRiZc4s_bx7-JlPYZM_yKDmeavt3oo,242
9
+ schemathesis/_xml.py,sha256=qc2LydEwIqcSfgqQOJqiYicivA4YFJGKgCBOem_JqNc,8560
10
+ schemathesis/auths.py,sha256=De97IS_iOlC36-jRhkZ2DUndjUpXYgsd8R-nA-iHn88,16837
11
+ schemathesis/checks.py,sha256=YPUI1N5giGBy1072vd77e6HWelGAKrJUmJLEG4oqfF8,2630
12
+ schemathesis/code_samples.py,sha256=rsdTo6ksyUs3ZMhqx0mmmkPSKUCFa--snIOYsXgZd80,4120
13
+ schemathesis/constants.py,sha256=l1YQ7PXhEj9dyf9CTESVUpPOaFCH7iz-Fe8o4v6Th_s,2673
14
+ schemathesis/exceptions.py,sha256=5zjPlyVoQNJGbwufplL6ZVV7FEBPBNPHGdlQRJ7xnhE,20449
15
+ schemathesis/failures.py,sha256=fybNkCF2rqH90e3KW_XwpgZnSM6f7_FERcxHT9Pd3NM,7911
16
+ schemathesis/filters.py,sha256=f3c_yXIBwIin-9Y0qU2TkcC1NEM_Mw34jGUHQc0BOyw,17026
17
+ schemathesis/graphql.py,sha256=XiuKcfoOB92iLFC8zpz2msLkM0_V0TLdxPNBqrrGZ8w,216
18
+ schemathesis/hooks.py,sha256=p5AXgjVGtka0jn9MOeyBaRUtNbqZTs4iaJqytYTacHc,14856
19
+ schemathesis/lazy.py,sha256=Ddhkk7Tpc_VcRGYkCtKDmP2gpjxVmEZ3b01ZTNjbm8I,19004
20
+ schemathesis/loaders.py,sha256=MoEhcdOEBJxNRn5X-ZNhWB9jZDHQQNpkNfEdQjf_NDw,4590
21
+ schemathesis/models.py,sha256=4MX3ErKMdueUXGcVPZuvMTbesUglbuj0ukgCmg3nhP8,50014
22
+ schemathesis/parameters.py,sha256=izlu4MFYT1RWrC4RBxrV6weeCal-ODbdLQLMb0PYCZY,2327
23
+ schemathesis/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
24
+ schemathesis/sanitization.py,sha256=Lycn1VVfula9B6XpzkxTHja7CZ7RHqbUh9kBic0Yi4M,9056
25
+ schemathesis/schemas.py,sha256=kwgdRD7JdE0iovuZVqArQCf_Dqfo2CsqqWYeR_bgsZo,20526
26
+ schemathesis/serializers.py,sha256=HyYVSVR71FhWfIErnH6OoGLOa4tkh9mTeVUTIpzEW24,11739
27
+ schemathesis/targets.py,sha256=XIGRghvEzbmEJjse9aZgNEj67L3jAbiazm2rxURWgDE,2351
28
+ schemathesis/throttling.py,sha256=aisUc4MJDGIOGUAs9L2DlWWpdd4KyAFuNVKhYoaUC9M,1719
29
+ schemathesis/types.py,sha256=Tem2Q_zyMCd0Clp5iGKv6Fu13wdcbxVE8tCVH9WWt7A,1065
30
+ schemathesis/utils.py,sha256=LwqxqoAKmRiAdj-qUbNmgQgsamc49V5lc5TnOIDuuMA,4904
31
+ schemathesis/cli/__init__.py,sha256=IxJnRTCp0bl1B044jjD9GFJ2pisckw3-PBnNHcABBy4,75795
32
+ schemathesis/cli/__main__.py,sha256=MWaenjaUTZIfNPFzKmnkTiawUri7DVldtg3mirLwzU8,92
33
+ schemathesis/cli/callbacks.py,sha256=-VA_I_mVma9WxFNtUR8d2KNICKJD5ScayfSdKKPEP5Y,16321
34
+ schemathesis/cli/cassettes.py,sha256=zji-B-uuwyr0Z0BzQX-DLMV6lWb58JtLExcUE1v3m4Y,20153
35
+ schemathesis/cli/constants.py,sha256=wk-0GsoJIel8wFFerQ6Kf_6eAYUtIWkwMFwyAqv3yj4,1635
36
+ schemathesis/cli/context.py,sha256=j_lvYQiPa6Q7P4P_IGCM9V2y2gJSpDbpxIIzR5oFB2I,2567
37
+ schemathesis/cli/debug.py,sha256=_YA-bX1ujHl4bqQDEum7M-I2XHBTEGbvgkhvcvKhmgU,658
38
+ schemathesis/cli/handlers.py,sha256=EXSAFe5TQlHANz1AVlSttfsoDT2oeaeFbqq1N7e2udw,467
39
+ schemathesis/cli/junitxml.py,sha256=_psBdqGwH4OKySSWeva41mbgGLav86UnWhQyOt99gnU,5331
40
+ schemathesis/cli/options.py,sha256=yL7nrzKkbGCc4nQya9wpTW48XGz_OT9hOFrzPxRrDe4,2853
41
+ schemathesis/cli/reporting.py,sha256=KC3sxSc1u4aFQ-0Q8CQ3G4HTEl7QxlubGnJgNKmVJdQ,3627
42
+ schemathesis/cli/sanitization.py,sha256=Onw_NWZSom6XTVNJ5NHnC0PAhrYAcGzIXJbsBCzLkn4,1005
43
+ schemathesis/cli/output/__init__.py,sha256=AXaUzQ1nhQ-vXhW4-X-91vE2VQtEcCOrGtQXXNN55iQ,29
44
+ schemathesis/cli/output/default.py,sha256=IB6q7h-eu4Hg6P-n-NGyraf9s4luN7I3FCDsYCPVa60,39781
45
+ schemathesis/cli/output/short.py,sha256=CL6-Apxr5tuZ3BL1vecV1MiRY1wDt21g0wiUwZu6mLM,2607
46
+ schemathesis/contrib/__init__.py,sha256=FH8NL8NXgSKBFOF8Jy_EB6T4CJEaiM-tmDhz16B2o4k,187
47
+ schemathesis/contrib/unique_data.py,sha256=cTjJfoNpfLMobUzmGnm3k6kVrZcL34_FMPLlpDDsg4c,1249
48
+ schemathesis/contrib/openapi/__init__.py,sha256=N-BoCzrLGq9aynubhmQBS-LJUBv1wPJcveMCJDhyQl4,217
49
+ schemathesis/contrib/openapi/fill_missing_examples.py,sha256=SL3LXG4khjGKneU3aBu1MGIhYtwRMjK77NH8L--9JBE,583
50
+ schemathesis/contrib/openapi/formats/__init__.py,sha256=OpHWPW8MkTLVv83QXPYY1HVLflhmSH49hSVefm1oVV0,111
51
+ schemathesis/contrib/openapi/formats/uuid.py,sha256=PG7aV0QAQnQ1zKmKiDK3cJue3Xy-TLGzyMeCB_RQbgk,391
52
+ schemathesis/experimental/__init__.py,sha256=0YVz037-Koc1OZ9Y5oYujc4if0gE9SdtfFlWnfzrWNo,3498
53
+ schemathesis/extra/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
54
+ schemathesis/extra/_aiohttp.py,sha256=-bIY0ucv7pfK3gA9PHiO4n7ajtZJJM9pS3EY3cLau9c,957
55
+ schemathesis/extra/_flask.py,sha256=lpKQxg_kdEFo59Q8sV5T78IJYhgx6p4SCwIohJYSycw,345
56
+ schemathesis/extra/_server.py,sha256=JFJTgJjpZu_eVZkI16rLaXJSv55Awbl7JNqegCLnQBg,541
57
+ schemathesis/extra/pytest_plugin.py,sha256=3FF7pcqK26J__FGq6uOZdaD-1tZ-khQEwpdwb1ueFPc,12617
58
+ schemathesis/fixups/__init__.py,sha256=RP5QYJVJhp8LXjhH89fCRaIVU26dHCy74jD9seoYMuc,967
59
+ schemathesis/fixups/fast_api.py,sha256=mn-KzBqnR8jl4W5fY-_ZySabMDMUnpzCIESMHnlvE1c,1304
60
+ schemathesis/fixups/utf8_bom.py,sha256=lWT9RNmJG8i-l5AXIpaCT3qCPUwRgzXPW3eoOjmZETA,745
61
+ schemathesis/generation/__init__.py,sha256=29Zys_tD6kfngaC4zHeC6TOBZQcmo7CWm7KDSYsHStQ,1581
62
+ schemathesis/generation/_hypothesis.py,sha256=74fzLPHugZgMQXerWYFAMqCAjtAXz5E4gek7Gnkhli4,1756
63
+ schemathesis/generation/_methods.py,sha256=r8oVlJ71_gXcnEhU-byw2E0R2RswQQFm8U7yGErSqbw,1204
64
+ schemathesis/generation/coverage.py,sha256=XgT1yX6iy__qEXN3lFs0PYZkFwXFHAgJf7ow3nmjcDc,39243
65
+ schemathesis/internal/__init__.py,sha256=93HcdG3LF0BbQKbCteOsFMa1w6nXl8yTmx87QLNJOik,161
66
+ schemathesis/internal/checks.py,sha256=YBhldvs-oQTrtvTlz3cjaO9Ri2oQeyobFcquO4Y0UJ8,2720
67
+ schemathesis/internal/copy.py,sha256=DcL56z-d69kKR_5u8mlHvjSL1UTyUKNMAwexrwHFY1s,1031
68
+ schemathesis/internal/datetime.py,sha256=zPLBL0XXLNfP-KYel3H2m8pnsxjsA_4d-zTOhJg2EPQ,136
69
+ schemathesis/internal/deprecation.py,sha256=Ty5VBFBlufkITpP0WWTPIPbnB7biDi0kQgXVYWZp820,1273
70
+ schemathesis/internal/diff.py,sha256=upGqM6s9WDT653wzxK_tqclFCxqkzB0j4wsO1foq5_k,466
71
+ schemathesis/internal/extensions.py,sha256=h0aHRK_PTKfiAufkeBziegQS8537TL-Gr1hPW48q8Yc,790
72
+ schemathesis/internal/jsonschema.py,sha256=-7tF15cXo1ZdhiRFYYfEClXihX2Svc5Loi_Dz1x201k,1157
73
+ schemathesis/internal/output.py,sha256=zMaG5knIuBieVH8CrcmPJgbmQukDs2xdekX0BrK7BZs,1989
74
+ schemathesis/internal/result.py,sha256=d449YvyONjqjDs-A5DAPgtAI96iT753K8sU6_1HLo2Q,461
75
+ schemathesis/internal/transformation.py,sha256=M5LA4pFZC4nD_0iGfih1wLF3_q8xJas94Uuaymt-7Cw,690
76
+ schemathesis/internal/validation.py,sha256=G7i8jIMUpAeOnDsDF_eWYvRZe_yMprRswx0QAtMPyEw,966
77
+ schemathesis/runner/__init__.py,sha256=r8SoHc3X_wk5lfmt9P87gzv6nvbIowkQ2-WlT7fhReY,22182
78
+ schemathesis/runner/events.py,sha256=cRKKSDvHvKLBIyFBz-J0JtAKshbGGKco9eaMyLCgzsY,11734
79
+ schemathesis/runner/probes.py,sha256=no5AfO3kse25qvHevjeUfB0Q3C860V2AYzschUW3QMQ,5688
80
+ schemathesis/runner/serialization.py,sha256=vZi1wd9HX9Swp9VJ_hZFeDgy3Y726URpHra-TbPvQhk,20762
81
+ schemathesis/runner/impl/__init__.py,sha256=1E2iME8uthYPBh9MjwVBCTFV-P3fi7AdphCCoBBspjs,199
82
+ schemathesis/runner/impl/context.py,sha256=oEdkXnlibVDobDRCMliImQwtX5RPEKgVEwVBCN67mfE,3132
83
+ schemathesis/runner/impl/core.py,sha256=aUeJxW3cvfi5IYwU2GqhDfcKrCK3GtMnsts-qyaIXGQ,48086
84
+ schemathesis/runner/impl/solo.py,sha256=y5QSxgK8nBCEjZVD5BpFvYUXmB6tEjk6TwxAo__NejA,2911
85
+ schemathesis/runner/impl/threadpool.py,sha256=yNR5LYE8f3N_4t42OwSgy0_qdGgBPM7d11F9c9oEAAs,15075
86
+ schemathesis/service/__init__.py,sha256=cDVTCFD1G-vvhxZkJUwiToTAEQ-0ByIoqwXvJBCf_V8,472
87
+ schemathesis/service/auth.py,sha256=AiZXvSNwz1Hi3fn-OCp6XD-E4GAMDlfcX8fORJ8_dLo,445
88
+ schemathesis/service/ci.py,sha256=3m9xSWFhrpWA6mI_8bXI7sspND9RSqXFM9UseO5nIiM,6782
89
+ schemathesis/service/client.py,sha256=9h-y7-GGO3lsuOfSVSMKeHH8nw91rk3Bi06gr23r3E4,5222
90
+ schemathesis/service/constants.py,sha256=Q1bhtLRkmhso4KSVAtWl0u446Wlbk3ShOL3ZdbPoJOM,1502
91
+ schemathesis/service/events.py,sha256=YHhVB66bRODx2ZnG4vjE6lVg3LqzOrsMb8O8vtc8SpE,1294
92
+ schemathesis/service/extensions.py,sha256=9TBvH762I4DKUQEE551oTH4cHRlVsRXBMDdMVwaFjQk,7805
93
+ schemathesis/service/hosts.py,sha256=gg4xObk3G9p39bkmAvX3gJpZ3Anx-Fnwm9T03qov0LE,3161
94
+ schemathesis/service/metadata.py,sha256=6CEyYbf2GkoqUHzC0U1br6DkrF12VBbjr8yhOfRZ0fM,2086
95
+ schemathesis/service/models.py,sha256=nUf38yf2AK8-B56KHjviVlVe-fjos9Dp-M8YAWOIkrc,6572
96
+ schemathesis/service/report.py,sha256=FHIlt0UcDQkwRlqsnURuBD7O6PdXlAMJlCdWdukIoiY,8302
97
+ schemathesis/service/serialization.py,sha256=20APAy8CZ561agg4FP17PIEX8hB0LXtk_p7dpO1Z-JI,6278
98
+ schemathesis/service/usage.py,sha256=UbXqxeDq5mAjKkfV4hApZsReZmQHXiqoXUYn_Z6YuZk,2438
99
+ schemathesis/specs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
100
+ schemathesis/specs/graphql/__init__.py,sha256=fgyHtvWNUVWismBTOqxQtgLoTighTfvMv6v6QCD_Oyc,85
101
+ schemathesis/specs/graphql/_cache.py,sha256=7ras3q_InDJBPykgHroerl9f2jFamC8xJD35376Zs6I,795
102
+ schemathesis/specs/graphql/loaders.py,sha256=-PUdzGiGo1BZWe9slaUmqeamMqCM6daq2lSrFblomCc,12339
103
+ schemathesis/specs/graphql/nodes.py,sha256=bE3G1kNmqJ8OV4igBvIK-UORrkQA6Nofduf87O3TD9I,541
104
+ schemathesis/specs/graphql/scalars.py,sha256=9tvLTiYVe8A_E8ASA0czz3Z0Mp9lyak7R4wHpAE_jKo,1805
105
+ schemathesis/specs/graphql/schemas.py,sha256=6oTsg730KBswaeZK9EttVCxxk8FWV1JHjyiVzU6qXlQ,14445
106
+ schemathesis/specs/graphql/validation.py,sha256=uINIOt-2E7ZuQV2CxKzwez-7L9tDtqzMSpnVoRWvxy0,1635
107
+ schemathesis/specs/openapi/__init__.py,sha256=HDcx3bqpa6qWPpyMrxAbM3uTo0Lqpg-BUNZhDJSJKnw,279
108
+ schemathesis/specs/openapi/_cache.py,sha256=PAiAu4X_a2PQgD2lG5H3iisXdyg4SaHpU46bRZvfNkM,4320
109
+ schemathesis/specs/openapi/_hypothesis.py,sha256=nU8UDn1PzGCre4IVmwIuO9-CZv1KJe1fYY0d2BojhSo,22981
110
+ schemathesis/specs/openapi/checks.py,sha256=q6BbsrNFs9lx7WNJQg-ZnlGN8B5kW7wTq5btqisWF7w,26194
111
+ schemathesis/specs/openapi/constants.py,sha256=JqM_FHOenqS_MuUE9sxVQ8Hnw0DNM8cnKDwCwPLhID4,783
112
+ schemathesis/specs/openapi/converter.py,sha256=Yxw9lS_JKEyi-oJuACT07fm04bqQDlAu-iHwzkeDvE4,3546
113
+ schemathesis/specs/openapi/definitions.py,sha256=WTkWwCgTc3OMxfKsqh6YDoGfZMTThSYrHGp8h0vLAK0,93935
114
+ schemathesis/specs/openapi/examples.py,sha256=hdeq7et8AexYGY2iU6SfMZWJ7G0PbOfapUtc4upNs_4,20483
115
+ schemathesis/specs/openapi/formats.py,sha256=3KtEC-8nQRwMErS-WpMadXsr8R0O-NzYwFisZqMuc-8,2761
116
+ schemathesis/specs/openapi/links.py,sha256=C4Uir2P_EcpqME8ee_a1vdUM8Tm3ZcKNn2YsGjZiMUQ,17935
117
+ schemathesis/specs/openapi/loaders.py,sha256=5B1cgYEBj3h2psPQxzrQ5Xq5owLVGw-u9HsCQIx7yFE,25705
118
+ schemathesis/specs/openapi/media_types.py,sha256=dNTxpRQbY3SubdVjh4Cjb38R6Bc9MF9BsRQwPD87x0g,1017
119
+ schemathesis/specs/openapi/parameters.py,sha256=LUahlWKCDSlp94v2IA1Q90pyeECgO6FmrqbzCU-9Z0Y,14658
120
+ schemathesis/specs/openapi/patterns.py,sha256=aEOiJeqI_qcE9bE2Viz6TUA8UppiTHm6QFxrLJryag8,5520
121
+ schemathesis/specs/openapi/references.py,sha256=euxM02kQGMHh4Ss1jWjOY_gyw_HazafKITIsvOEiAvI,9831
122
+ schemathesis/specs/openapi/schemas.py,sha256=JA9SiBnwYg75kYnd4_0CWOuQv_XTfYwuDeGmFe4RtVo,53724
123
+ schemathesis/specs/openapi/security.py,sha256=Z-6pk2Ga1PTUtBe298KunjVHsNh5A-teegeso7zcPIE,7138
124
+ schemathesis/specs/openapi/serialization.py,sha256=5qGdFHZ3n80UlbSXrO_bkr4Al_7ci_Z3aSUjZczNDQY,11384
125
+ schemathesis/specs/openapi/utils.py,sha256=ER4vJkdFVDIE7aKyxyYatuuHVRNutytezgE52pqZNE8,900
126
+ schemathesis/specs/openapi/validation.py,sha256=Q9ThZlwU-mSz7ExDnIivnZGi1ivC5hlX2mIMRAM79kc,999
127
+ schemathesis/specs/openapi/expressions/__init__.py,sha256=hFpJrIWbPi55GcIVjNFRDDUL8xmDu3mdbdldoHBoFJ0,1729
128
+ schemathesis/specs/openapi/expressions/context.py,sha256=GsraXq4azVg4pn0vilc6P7zZjzUWvoO7VUqmshqvmeQ,350
129
+ schemathesis/specs/openapi/expressions/errors.py,sha256=YLVhps-sYcslgVaahfcUYxUSHlIfWL-rQMeT5PZSMZ8,219
130
+ schemathesis/specs/openapi/expressions/extractors.py,sha256=FK7NIFuZ3voqRwQ4Uz0wIX_tlXqP7fc4m6MG6EBUOok,526
131
+ schemathesis/specs/openapi/expressions/lexer.py,sha256=LeVE6fgYT9-fIsXrv0-YrRHnI4VPisbwsexyh9Q5YU0,3982
132
+ schemathesis/specs/openapi/expressions/nodes.py,sha256=UOVrK8fRHACv0T460CPSyO6OU5aeKnE2eKX4HF9SiFs,3990
133
+ schemathesis/specs/openapi/expressions/parser.py,sha256=gM_Ob-TlTGxpgjZGRHNyPhBj1YAvRgRoSlNCrE7-djk,4452
134
+ schemathesis/specs/openapi/negative/__init__.py,sha256=MG0tx3a7BYx0mVg0pjTojq1fLufMmd_x4zppR3oz-Mk,3739
135
+ schemathesis/specs/openapi/negative/mutations.py,sha256=_BfeqOeqlEo8KuPuFLv3Z7kAR_9G7dvTtyMyMGlkp6o,19244
136
+ schemathesis/specs/openapi/negative/types.py,sha256=a7buCcVxNBG6ILBM3A7oNTAX0lyDseEtZndBuej8MbI,174
137
+ schemathesis/specs/openapi/negative/utils.py,sha256=ozcOIuASufLqZSgnKUACjX-EOZrrkuNdXX0SDnLoGYA,168
138
+ schemathesis/specs/openapi/stateful/__init__.py,sha256=Iu77XE4iUuiz32UoYFqIe7H3yLEC4HKflG0ZX0JCyHg,9451
139
+ schemathesis/specs/openapi/stateful/statistic.py,sha256=xV_I2Oy-H7K_53nedLMy0rR6kIEvgtXwnGl53UixDZQ,7441
140
+ schemathesis/specs/openapi/stateful/types.py,sha256=DtxmxdvCbzlgoyecudXP84qF7NuCv3fRal3oJJs7eAU,456
141
+ schemathesis/stateful/__init__.py,sha256=HBg-h131EI8IipHQgufSaXe-CrFTKmffPVsoEFjPUmE,5100
142
+ schemathesis/stateful/config.py,sha256=huYzqDoD6x20p_VNAR79NgxPwUFO8UXoc3_z4BEuHqU,3586
143
+ schemathesis/stateful/context.py,sha256=lpCOVhJEbPOp8F_Z_YvU5ptVTgaKJsllvI1NK28Dtvs,5085
144
+ schemathesis/stateful/events.py,sha256=CyYvyQebOaeTn6UevaB7HXOrUhxCWbqXMfQ7pZK7fV8,6727
145
+ schemathesis/stateful/runner.py,sha256=3tRRmWcXp5GCeRWGOtQ9-W0rxljoR06qSCKC4r7EQyY,12672
146
+ schemathesis/stateful/sink.py,sha256=bHYlgh-fMwg1Srxk_XGs0-WV34YccotwH9PGrxCK57A,2474
147
+ schemathesis/stateful/state_machine.py,sha256=PFztY82W5enuXjO6k4Mz8fbHmDJ7Z8OLYZRWtuBeyjg,12956
148
+ schemathesis/stateful/statistic.py,sha256=2-uU5xpT9CbMulKgJWLZN6MUpC0Fskf5yXTt4ef4NFA,542
149
+ schemathesis/stateful/validation.py,sha256=23qSZjC1_xRmtCX4OqsyG6pGxdlo6IZYid695ZpDQyU,3747
150
+ schemathesis/transports/__init__.py,sha256=k35qBp-657qnHE9FfCowqO3rqOgCwSUnrdl2vAV3hnQ,12951
151
+ schemathesis/transports/asgi.py,sha256=bwW9vMd1h89Jh7I4jHJVwSNUQzHvc7-JOD5u4hSHZd8,212
152
+ schemathesis/transports/auth.py,sha256=urSTO9zgFO1qU69xvnKHPFQV0SlJL3d7_Ojl0tLnZwo,1143
153
+ schemathesis/transports/content_types.py,sha256=MiKOm-Hy5i75hrROPdpiBZPOTDzOwlCdnthJD12AJzI,2187
154
+ schemathesis/transports/headers.py,sha256=hr_AIDOfUxsJxpHfemIZ_uNG3_vzS_ZeMEKmZjbYiBE,990
155
+ schemathesis/transports/responses.py,sha256=OFD4ZLqwEFpo7F9vaP_SVgjhxAqatxIj38FS4XVq8Qs,1680
156
+ schemathesis-3.39.7.dist-info/METADATA,sha256=RPz_6oHuJfbpI3FA7Sgcs0L_pgJm3Z9-iVKpRI-3FtA,11976
157
+ schemathesis-3.39.7.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
158
+ schemathesis-3.39.7.dist-info/entry_points.txt,sha256=VHyLcOG7co0nOeuk8WjgpRETk5P1E2iCLrn26Zkn5uk,158
159
+ schemathesis-3.39.7.dist-info/licenses/LICENSE,sha256=PsPYgrDhZ7g9uwihJXNG-XVb55wj2uYhkl2DD8oAzY0,1103
160
+ schemathesis-3.39.7.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: hatchling 1.12.2
2
+ Generator: hatchling 1.27.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -1,49 +0,0 @@
1
- from __future__ import annotations
2
- import re
3
-
4
- from ...types import Filter
5
-
6
-
7
- def should_skip_method(method: str, pattern: Filter | None) -> bool:
8
- if pattern is None:
9
- return False
10
- patterns = _ensure_tuple(pattern)
11
- return method.upper() not in map(str.upper, patterns)
12
-
13
-
14
- def should_skip_endpoint(endpoint: str, pattern: Filter | None) -> bool:
15
- if pattern is None:
16
- return False
17
- return not _match_any_pattern(endpoint, pattern)
18
-
19
-
20
- def should_skip_by_tag(tags: list[str] | None, pattern: Filter | None) -> bool:
21
- if pattern is None:
22
- return False
23
- if not tags:
24
- return True
25
- patterns = _ensure_tuple(pattern)
26
- return not any(re.search(item, tag) for item in patterns for tag in tags)
27
-
28
-
29
- def should_skip_by_operation_id(operation_id: str | None, pattern: Filter | None) -> bool:
30
- if pattern is None:
31
- return False
32
- if not operation_id:
33
- return True
34
- return not _match_any_pattern(operation_id, pattern)
35
-
36
-
37
- def should_skip_deprecated(is_deprecated: bool, skip_deprecated_operations: bool) -> bool:
38
- return skip_deprecated_operations and is_deprecated
39
-
40
-
41
- def _match_any_pattern(target: str, pattern: Filter) -> bool:
42
- patterns = _ensure_tuple(pattern)
43
- return any(re.search(item, target) for item in patterns)
44
-
45
-
46
- def _ensure_tuple(item: Filter) -> list | set | tuple:
47
- if not isinstance(item, (list, set, tuple)):
48
- return (item,)
49
- return item
@@ -1,92 +0,0 @@
1
- from __future__ import annotations
2
- from dataclasses import dataclass
3
- from typing import TYPE_CHECKING, Callable, Dict, List
4
-
5
- import hypothesis.strategies as st
6
- from requests.structures import CaseInsensitiveDict
7
-
8
- from ..links import OpenAPILink, get_all_links
9
- from ..utils import expand_status_code
10
-
11
- if TYPE_CHECKING:
12
- from ....stateful.state_machine import StepResult
13
- from ....models import APIOperation
14
-
15
- FilterFunction = Callable[["StepResult"], bool]
16
-
17
-
18
- @dataclass
19
- class Connection:
20
- source: str
21
- strategy: st.SearchStrategy[tuple[StepResult, OpenAPILink]]
22
-
23
-
24
- APIOperationConnections = Dict[str, List[Connection]]
25
-
26
-
27
- def apply(
28
- operation: APIOperation,
29
- bundles: dict[str, CaseInsensitiveDict],
30
- connections: APIOperationConnections,
31
- ) -> None:
32
- """Gather all connections based on Open API links definitions."""
33
- all_status_codes = list(operation.definition.resolved["responses"])
34
- for status_code, link in get_all_links(operation):
35
- target_operation = link.get_target_operation()
36
- strategy = bundles[operation.path][operation.method.upper()].filter(
37
- make_response_filter(status_code, all_status_codes)
38
- )
39
- connection = Connection(source=operation.verbose_name, strategy=_convert_strategy(strategy, link))
40
- connections[target_operation.verbose_name].append(connection)
41
-
42
-
43
- def _convert_strategy(
44
- strategy: st.SearchStrategy[StepResult], link: OpenAPILink
45
- ) -> st.SearchStrategy[tuple[StepResult, OpenAPILink]]:
46
- # This function is required to capture values properly (it won't work properly when lambda is defined in a loop)
47
- return strategy.map(lambda out: (out, link))
48
-
49
-
50
- def make_response_filter(status_code: str, all_status_codes: list[str]) -> FilterFunction:
51
- """Create a filter for stored responses.
52
-
53
- This filter will decide whether some response is suitable to use as a source for requesting some API operation.
54
- """
55
- if status_code == "default":
56
- return default_status_code(all_status_codes)
57
- return match_status_code(status_code)
58
-
59
-
60
- def match_status_code(status_code: str) -> FilterFunction:
61
- """Create a filter function that matches all responses with the given status code.
62
-
63
- Note that the status code can contain "X", which means any digit.
64
- For example, 50X will match all status codes from 500 to 509.
65
- """
66
- status_codes = set(expand_status_code(status_code))
67
-
68
- def compare(result: StepResult) -> bool:
69
- return result.response.status_code in status_codes
70
-
71
- # This name is displayed in the resulting strategy representation. For example, if you run your tests with
72
- # `--hypothesis-show-statistics`, then you can see `Bundle(name='GET /users/{user_id}').filter(match_200_response)`
73
- # which gives you information about the particularly used filter.
74
- compare.__name__ = f"match_{status_code}_response"
75
-
76
- return compare
77
-
78
-
79
- def default_status_code(status_codes: list[str]) -> FilterFunction:
80
- """Create a filter that matches all "default" responses.
81
-
82
- In Open API, the "default" response is the one that is used if no other options were matched.
83
- Therefore we need to match only responses that were not matched by other listed status codes.
84
- """
85
- expanded_status_codes = {
86
- status_code for value in status_codes if value != "default" for status_code in expand_status_code(value)
87
- }
88
-
89
- def match_default_response(result: StepResult) -> bool:
90
- return result.response.status_code not in expanded_status_codes
91
-
92
- return match_default_response