schemathesis 4.0.0a10__py3-none-any.whl → 4.0.0a12__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 (111) hide show
  1. schemathesis/__init__.py +29 -30
  2. schemathesis/auths.py +65 -24
  3. schemathesis/checks.py +73 -39
  4. schemathesis/cli/commands/__init__.py +51 -3
  5. schemathesis/cli/commands/data.py +10 -0
  6. schemathesis/cli/commands/run/__init__.py +163 -274
  7. schemathesis/cli/commands/run/context.py +8 -4
  8. schemathesis/cli/commands/run/events.py +11 -1
  9. schemathesis/cli/commands/run/executor.py +70 -78
  10. schemathesis/cli/commands/run/filters.py +15 -165
  11. schemathesis/cli/commands/run/handlers/cassettes.py +105 -104
  12. schemathesis/cli/commands/run/handlers/junitxml.py +5 -4
  13. schemathesis/cli/commands/run/handlers/output.py +195 -121
  14. schemathesis/cli/commands/run/loaders.py +35 -50
  15. schemathesis/cli/commands/run/validation.py +52 -162
  16. schemathesis/cli/core.py +5 -3
  17. schemathesis/cli/ext/fs.py +7 -5
  18. schemathesis/cli/ext/options.py +0 -21
  19. schemathesis/config/__init__.py +189 -0
  20. schemathesis/config/_auth.py +51 -0
  21. schemathesis/config/_checks.py +268 -0
  22. schemathesis/config/_diff_base.py +99 -0
  23. schemathesis/config/_env.py +21 -0
  24. schemathesis/config/_error.py +156 -0
  25. schemathesis/config/_generation.py +149 -0
  26. schemathesis/config/_health_check.py +24 -0
  27. schemathesis/config/_operations.py +327 -0
  28. schemathesis/config/_output.py +171 -0
  29. schemathesis/config/_parameters.py +19 -0
  30. schemathesis/config/_phases.py +187 -0
  31. schemathesis/config/_projects.py +523 -0
  32. schemathesis/config/_rate_limit.py +17 -0
  33. schemathesis/config/_report.py +120 -0
  34. schemathesis/config/_validator.py +9 -0
  35. schemathesis/config/_warnings.py +25 -0
  36. schemathesis/config/schema.json +885 -0
  37. schemathesis/core/__init__.py +2 -0
  38. schemathesis/core/compat.py +16 -9
  39. schemathesis/core/errors.py +24 -4
  40. schemathesis/core/failures.py +6 -7
  41. schemathesis/core/hooks.py +20 -0
  42. schemathesis/core/output/__init__.py +14 -37
  43. schemathesis/core/output/sanitization.py +3 -146
  44. schemathesis/core/transport.py +36 -1
  45. schemathesis/core/validation.py +16 -0
  46. schemathesis/engine/__init__.py +2 -4
  47. schemathesis/engine/context.py +42 -43
  48. schemathesis/engine/core.py +7 -5
  49. schemathesis/engine/errors.py +60 -1
  50. schemathesis/engine/events.py +10 -2
  51. schemathesis/engine/phases/__init__.py +10 -0
  52. schemathesis/engine/phases/probes.py +11 -8
  53. schemathesis/engine/phases/stateful/__init__.py +2 -1
  54. schemathesis/engine/phases/stateful/_executor.py +104 -46
  55. schemathesis/engine/phases/stateful/context.py +2 -2
  56. schemathesis/engine/phases/unit/__init__.py +23 -15
  57. schemathesis/engine/phases/unit/_executor.py +110 -21
  58. schemathesis/engine/phases/unit/_pool.py +1 -1
  59. schemathesis/errors.py +2 -0
  60. schemathesis/filters.py +2 -3
  61. schemathesis/generation/__init__.py +5 -33
  62. schemathesis/generation/case.py +6 -3
  63. schemathesis/generation/coverage.py +154 -124
  64. schemathesis/generation/hypothesis/builder.py +70 -20
  65. schemathesis/generation/meta.py +3 -3
  66. schemathesis/generation/metrics.py +93 -0
  67. schemathesis/generation/modes.py +0 -8
  68. schemathesis/generation/overrides.py +37 -1
  69. schemathesis/generation/stateful/__init__.py +4 -0
  70. schemathesis/generation/stateful/state_machine.py +9 -1
  71. schemathesis/graphql/loaders.py +159 -16
  72. schemathesis/hooks.py +62 -35
  73. schemathesis/openapi/checks.py +12 -8
  74. schemathesis/openapi/generation/filters.py +10 -8
  75. schemathesis/openapi/loaders.py +142 -17
  76. schemathesis/pytest/lazy.py +2 -5
  77. schemathesis/pytest/loaders.py +24 -0
  78. schemathesis/pytest/plugin.py +33 -2
  79. schemathesis/schemas.py +21 -66
  80. schemathesis/specs/graphql/scalars.py +37 -3
  81. schemathesis/specs/graphql/schemas.py +23 -18
  82. schemathesis/specs/openapi/_hypothesis.py +26 -28
  83. schemathesis/specs/openapi/checks.py +37 -36
  84. schemathesis/specs/openapi/examples.py +4 -3
  85. schemathesis/specs/openapi/formats.py +32 -5
  86. schemathesis/specs/openapi/media_types.py +44 -1
  87. schemathesis/specs/openapi/negative/__init__.py +2 -2
  88. schemathesis/specs/openapi/patterns.py +46 -16
  89. schemathesis/specs/openapi/references.py +2 -3
  90. schemathesis/specs/openapi/schemas.py +19 -22
  91. schemathesis/specs/openapi/stateful/__init__.py +12 -6
  92. schemathesis/transport/__init__.py +54 -16
  93. schemathesis/transport/prepare.py +38 -13
  94. schemathesis/transport/requests.py +12 -9
  95. schemathesis/transport/wsgi.py +11 -12
  96. {schemathesis-4.0.0a10.dist-info → schemathesis-4.0.0a12.dist-info}/METADATA +50 -97
  97. schemathesis-4.0.0a12.dist-info/RECORD +164 -0
  98. schemathesis/cli/commands/run/checks.py +0 -79
  99. schemathesis/cli/commands/run/hypothesis.py +0 -78
  100. schemathesis/cli/commands/run/reports.py +0 -72
  101. schemathesis/cli/hooks.py +0 -36
  102. schemathesis/contrib/__init__.py +0 -9
  103. schemathesis/contrib/openapi/__init__.py +0 -9
  104. schemathesis/contrib/openapi/fill_missing_examples.py +0 -20
  105. schemathesis/engine/config.py +0 -59
  106. schemathesis/experimental/__init__.py +0 -72
  107. schemathesis/generation/targets.py +0 -69
  108. schemathesis-4.0.0a10.dist-info/RECORD +0 -153
  109. {schemathesis-4.0.0a10.dist-info → schemathesis-4.0.0a12.dist-info}/WHEEL +0 -0
  110. {schemathesis-4.0.0a10.dist-info → schemathesis-4.0.0a12.dist-info}/entry_points.txt +0 -0
  111. {schemathesis-4.0.0a10.dist-info → schemathesis-4.0.0a12.dist-info}/licenses/LICENSE +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: schemathesis
3
- Version: 4.0.0a10
3
+ Version: 4.0.0a12
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
@@ -29,7 +29,7 @@ Classifier: Programming Language :: Python :: Implementation :: CPython
29
29
  Classifier: Topic :: Software Development :: Testing
30
30
  Requires-Python: >=3.9
31
31
  Requires-Dist: backoff<3.0,>=2.1.2
32
- Requires-Dist: click<9.0,>=8.0
32
+ Requires-Dist: click<9,>=8.0
33
33
  Requires-Dist: colorama<1.0,>=0.4
34
34
  Requires-Dist: harfile<1.0,>=0.3.0
35
35
  Requires-Dist: httpx<1.0,>=0.22.0
@@ -45,6 +45,7 @@ Requires-Dist: pyyaml<7.0,>=5.1
45
45
  Requires-Dist: requests<3,>=2.22
46
46
  Requires-Dist: rich>=13.9.4
47
47
  Requires-Dist: starlette-testclient<1,>=0.4.1
48
+ Requires-Dist: tomli>=2.2.1
48
49
  Requires-Dist: typing-extensions>=4.12.2
49
50
  Requires-Dist: werkzeug<4,>=0.16.0
50
51
  Provides-Extra: bench
@@ -60,6 +61,8 @@ Requires-Dist: coverage[toml]>=5.3; extra == 'dev'
60
61
  Requires-Dist: fastapi>=0.86.0; extra == 'dev'
61
62
  Requires-Dist: flask<3.0,>=2.1.1; extra == 'dev'
62
63
  Requires-Dist: hypothesis-openapi<1,>=0.2; (python_version >= '3.10') and extra == 'dev'
64
+ Requires-Dist: mkdocs-material; extra == 'dev'
65
+ Requires-Dist: mkdocstrings[python]; extra == 'dev'
63
66
  Requires-Dist: pydantic>=1.10.2; extra == 'dev'
64
67
  Requires-Dist: pytest-asyncio<1.0,>=0.18.0; extra == 'dev'
65
68
  Requires-Dist: pytest-codspeed==2.2.1; extra == 'dev'
@@ -67,16 +70,13 @@ Requires-Dist: pytest-httpserver<2.0,>=1.0; extra == 'dev'
67
70
  Requires-Dist: pytest-mock<4.0,>=3.7.0; extra == 'dev'
68
71
  Requires-Dist: pytest-trio<1.0,>=0.8; extra == 'dev'
69
72
  Requires-Dist: pytest-xdist<4.0,>=3; extra == 'dev'
70
- Requires-Dist: sphinx; extra == 'dev'
71
- Requires-Dist: sphinx-click; extra == 'dev'
72
- Requires-Dist: sphinx-rtd-theme; extra == 'dev'
73
73
  Requires-Dist: strawberry-graphql[fastapi]>=0.109.0; extra == 'dev'
74
74
  Requires-Dist: syrupy<5.0,>=2; extra == 'dev'
75
+ Requires-Dist: tomli-w>=1.2.0; extra == 'dev'
75
76
  Requires-Dist: trustme<1.0,>=0.9.0; extra == 'dev'
76
77
  Provides-Extra: docs
77
- Requires-Dist: sphinx; extra == 'docs'
78
- Requires-Dist: sphinx-click; extra == 'docs'
79
- Requires-Dist: sphinx-rtd-theme; extra == 'docs'
78
+ Requires-Dist: mkdocs-material; extra == 'docs'
79
+ Requires-Dist: mkdocstrings[python]; extra == 'docs'
80
80
  Provides-Extra: tests
81
81
  Requires-Dist: aiohttp<4.0,>=3.9.1; extra == 'tests'
82
82
  Requires-Dist: coverage>=6; extra == 'tests'
@@ -91,6 +91,7 @@ Requires-Dist: pytest-trio<1.0,>=0.8; extra == 'tests'
91
91
  Requires-Dist: pytest-xdist<4.0,>=3; extra == 'tests'
92
92
  Requires-Dist: strawberry-graphql[fastapi]>=0.109.0; extra == 'tests'
93
93
  Requires-Dist: syrupy<5.0,>=2; extra == 'tests'
94
+ Requires-Dist: tomli-w>=1.2.0; extra == 'tests'
94
95
  Requires-Dist: trustme<1.0,>=0.9.0; extra == 'tests'
95
96
  Description-Content-Type: text/markdown
96
97
 
@@ -117,137 +118,89 @@ Description-Content-Type: text/markdown
117
118
 
118
119
  ## Schemathesis
119
120
 
120
- Schemathesis automatically generates and runs API tests from your OpenAPI or GraphQL schema to find bugs and spec violations.
121
+ > **Catch API bugs before your users do.**
122
+
123
+ Schemathesis automatically generates thousands of test cases from your OpenAPI or GraphQL schema and finds edge cases that break your API.
121
124
 
122
125
  <p align="center">
123
126
  <img src="https://raw.githubusercontent.com/schemathesis/schemathesis/master/img/demo.gif" alt="Schemathesis automatically finding a server error"/>
124
127
  <br>
125
- <i>Automatically finding specification violations and server errors</i>
128
+ <i>Finding bugs that manual testing missed</i>
126
129
  </p>
127
130
 
128
- > **Note:** This is the V4 branch under active development. While fully functional and passing tests, some features may be missing, and documentation is being updated. For the stable release, see the [V3 branch](https://github.com/schemathesis/schemathesis/tree/v3).
129
-
130
- ## Why Schemathesis?
131
-
132
- - 📑 **Schema-Based Testing** - Transform API documentation into a comprehensive test suite
133
- - 🚀 **Zero Configuration** - Begin testing immediately with a valid OpenAPI or GraphQL schema
134
- - ⚙️ **CI-Ready** - Integrate API testing into existing pipelines without complex configuration
135
- - 🛡️ **Effective Coverage** - Find edge cases no manual testing could uncover
136
- - 🔬 **Research-Backed**: [Recognized](https://dl.acm.org/doi/10.1145/3617175) in [academic research](https://ieeexplore.ieee.org/document/9793781) as a state-of-the-art API testing tool
137
-
138
- ## Installation
131
+ ## Try it now
139
132
 
140
133
  ```console
141
- # Using uv (recommended)
142
- $ uv pip install schemathesis
143
-
144
- # Using pip
145
- $ pip install schemathesis
134
+ # Test a demo API - finds real bugs instantly
135
+ uvx schemathesis run https://example.schemathesis.io/openapi.json
146
136
 
147
- # Using Docker
148
- $ docker pull schemathesis/schemathesis:stable
137
+ # Test your own API
138
+ uvx schemathesis run https://your-api.com/openapi.json
149
139
  ```
150
140
 
151
- ## Usage
152
141
 
153
- ### Command Line
142
+ ## What problems does it solve?
154
143
 
144
+ - 💥 **500 errors** that crash your API on edge case inputs
145
+ - 📋 **Schema violations** where your API returns different data than documented
146
+ - 🚪 **Validation bypasses** where invalid data gets accepted
147
+ - 🔗 **Integration failures** when responses don't match client expectations
148
+
149
+ # Installation & Usage
150
+
151
+ **Command Line:**
155
152
  ```console
156
- # Run tests against a schema URL
157
- $ st run https://example.schemathesis.io/openapi.json
153
+ uv pip install schemathesis
154
+ schemathesis run https://your-api.com/openapi.json
158
155
  ```
159
156
 
160
- ### Python Library
161
-
157
+ **Python Tests:**
162
158
  ```python
163
159
  import schemathesis
164
160
 
165
- schema = schemathesis.openapi.from_url("https://example.schemathesis.io/openapi.json")
166
-
161
+ schema = schemathesis.openapi.from_url("https://your-api.com/openapi.json")
167
162
 
168
163
  @schema.parametrize()
169
164
  def test_api(case):
170
- case.call_and_validate()
165
+ case.call_and_validate() # Finds bugs automatically
171
166
  ```
172
167
 
173
- ### CI/CD Integration
174
-
168
+ **CI/CD:**
175
169
  ```yaml
176
- # GitHub Actions example
177
- steps:
178
- - uses: schemathesis/action@v1
179
- with:
180
- schema: "https://example.schemathesis.io/openapi.json"
170
+ - uses: schemathesis/action@v1
171
+ with:
172
+ schema: "https://your-api.com/openapi.json"
181
173
  ```
182
174
 
183
- ## Documentation
184
-
185
- 📚 **[Read the full documentation](https://schemathesis.readthedocs.io/)** for guides, examples, and reference material.
186
-
187
- ## Who's Using Schemathesis?
188
-
189
- Schemathesis is used by companies and open-source projects including:
190
-
191
- - Netflix ([Dispatch](https://github.com/Netflix/dispatch))
192
- - Spotify ([Backstage](https://github.com/backstage/backstage))
193
- - WordPress ([OpenVerse](https://github.com/WordPress/openverse))
194
- - Chronosphere.io ([Calyptia](https://github.com/chronosphereio/calyptia-api))
195
- - [Qdrant](https://github.com/qdrant/qdrant)
196
- - [Pixie](https://github.com/pixie-io/pixie)
197
- - [CheckMK](https://github.com/Checkmk/checkmk)
198
- - [Weechat](https://github.com/weechat/weechat)
199
- - HXSecurity ([DongTai](https://github.com/HXSecurity/DongTai))
200
- - Abstract Machines ([Magistrala](https://github.com/absmach/magistrala))
201
- - Bundesstelle für Open Data ([smard-api](https://github.com/bundesAPI/smard-api))
202
-
203
- ## Testimonials
204
-
205
- "_The world needs modern, spec-based API tests, so we can deliver APIs as-designed. Schemathesis is the right tool for that job._"
206
-
207
- <div>Emmanuel Paraskakis - <strong>Level 250</strong></div>
175
+ ## Who uses it
208
176
 
209
- ---
210
-
211
- "_Schemathesis is the only sane way to thoroughly test an API._"
212
-
213
- <div>Zdenek Nemec - <strong>superface.ai</strong></div>
214
-
215
- ---
216
-
217
- "_The tool is amazing as it can test negative scenarios instead of me and much faster!_"
218
-
219
- <div>Luděk Nový - <strong>JetBrains</strong></div>
220
-
221
- ---
177
+ Used by teams at **[Spotify](https://github.com/backstage/backstage)**, **[WordPress](https://github.com/WordPress/openverse)**, **JetBrains**, **Red Hat** and dozens other companies.
222
178
 
223
- "_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._"
224
179
 
225
- <div>Dmitry Misharov - <strong>RedHat</strong></div>
180
+ > "_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._" - Dmitry Misharov, RedHat
226
181
 
227
- ---
182
+ ## Documentation
228
183
 
229
- "_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._"
184
+ 📚 **[Complete documentation](https://schemathesis.readthedocs.io/)** with guides, examples, and API reference.
230
185
 
231
- <div>Testing RESTful APIs: A Survey - <strong>a research paper by Golmohammadi, at al</strong></div>
186
+ ## Get Help
232
187
 
233
- ---
188
+ - 💬 [Discord community](https://discord.gg/R9ASRAmHnA)
189
+ - 🐛 [GitHub issues](https://github.com/schemathesis/schemathesis/issues)
190
+ - ✉️ [Email support](mailto:support@schemathesis.io)
234
191
 
235
192
  ## Contributing
236
193
 
237
- We welcome contributions! Your input directly influences Schemathesis development.
238
-
239
- - Discuss ideas in [GitHub issues](https://github.com/schemathesis/schemathesis/issues) or our [Discord server](https://discord.gg/R9ASRAmHnA)
240
- - See our [contributing guidelines](https://github.com/schemathesis/schemathesis/blob/master/CONTRIBUTING.rst) for code contributions
241
- - Share your experience using [this feedback form](https://forms.gle/kJ4hSxc1Yp6Ga96t5)
242
-
243
- ## Get in Touch
244
-
245
- Need assistance with integration or have specific questions? Contact us at <a href="mailto:support@schemathesis.io">support@schemathesis.io</a>.
194
+ We welcome contributions! See our [contributing guidelines](CONTRIBUTING.rst) and join discussions in [issues](https://github.com/schemathesis/schemathesis/issues) or [Discord](https://discord.gg/R9ASRAmHnA).
246
195
 
247
196
  ## Acknowledgements
248
197
 
249
198
  Schemathesis is built on top of <a href="https://hypothesis.works/" target="_blank">Hypothesis</a>, a powerful property-based testing library for Python.
250
199
 
200
+ ---
201
+
202
+ > **Note:** This is the V4 development branch. For the stable release, see [V3](https://github.com/schemathesis/schemathesis/tree/v3).
203
+
251
204
  ## License
252
205
 
253
206
  This project is licensed under the terms of the [MIT license](https://opensource.org/licenses/MIT).
@@ -0,0 +1,164 @@
1
+ schemathesis/__init__.py,sha256=c-zgYns-v0qpXvTJSc2gxz2medwiQgFRanoTZQiP7BA,1254
2
+ schemathesis/auths.py,sha256=hoKKM1POr4AeMcopGLK8fHqhH36-FSLpySxXI2xlc2M,16839
3
+ schemathesis/checks.py,sha256=eDs2WwVNS_T_Q8rKlfUKYbUcR7TURzW8eQ8ts9GsqVk,6382
4
+ schemathesis/errors.py,sha256=T8nobEi5tQX_SkwaYb8JFoIlF9F_vOQVprZ8EVPAhjA,931
5
+ schemathesis/filters.py,sha256=OEub50Ob5sf0Tn3iTeuIaxSMtepF7KVoiEM9wtt5GGA,13433
6
+ schemathesis/hooks.py,sha256=zhrA32jznnTxzRFWk2rM6gYtfC9tBodUGJygpKyu2pk,13943
7
+ schemathesis/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
+ schemathesis/schemas.py,sha256=GjjcD39k08McIsf62jCp959MDPt-wuE6SvOcrSSMOmM,25935
9
+ schemathesis/cli/__init__.py,sha256=U9gjzWWpiFhaqevPjZbwyTNjABdpvXETI4HgwdGKnvs,877
10
+ schemathesis/cli/__main__.py,sha256=MWaenjaUTZIfNPFzKmnkTiawUri7DVldtg3mirLwzU8,92
11
+ schemathesis/cli/constants.py,sha256=rUixnqorraUFDtOu3Nmm1x_k0qbgmW9xW96kQB_fBCQ,338
12
+ schemathesis/cli/core.py,sha256=ue7YUdVo3YvuzGL4s6i62NL6YqNDeVPBSnQ1znrvG2w,480
13
+ schemathesis/cli/commands/__init__.py,sha256=rubTCCRGuMIbNYOl8yQEioiuHtTq__tWjkUtFWYGhqQ,3433
14
+ schemathesis/cli/commands/data.py,sha256=_ALywjIeCZjuaoDQFy-Kj8RZkEGqXd-Y95O47h8Jszs,171
15
+ schemathesis/cli/commands/run/__init__.py,sha256=OzmofeSlyngQAQ1KRmjrQO3kTL-6APCpoG2TfpB34RA,18626
16
+ schemathesis/cli/commands/run/context.py,sha256=taegOHWc_B-HDwiU1R9Oi4q57mdfLXc-B954QUj8t7A,7984
17
+ schemathesis/cli/commands/run/events.py,sha256=ew0TQOc9T2YBZynYWv95k9yfAk8-hGuZDLMxjT8EhvY,1595
18
+ schemathesis/cli/commands/run/executor.py,sha256=kFbZw583SZ-jqjv8goTp2yEJOpZ_bzecyTeZvdc6qTE,5327
19
+ schemathesis/cli/commands/run/filters.py,sha256=pzkNRcf5vLPSsMfnvt711GNzRSBK5iZIFjPA0fiH1N4,1701
20
+ schemathesis/cli/commands/run/loaders.py,sha256=6j0ez7wduAUYbUT28ELKxMf-dYEWr_67m_KIuTSyNGk,4358
21
+ schemathesis/cli/commands/run/validation.py,sha256=FzCzYdW1-hn3OgyzPO1p6wHEX5PG7HdewbPRvclV_vc,9002
22
+ schemathesis/cli/commands/run/handlers/__init__.py,sha256=TPZ3KdGi8m0fjlN0GjA31MAXXn1qI7uU4FtiDwroXZI,1915
23
+ schemathesis/cli/commands/run/handlers/base.py,sha256=yDsTtCiztLksfk7cRzg8JlaAVOfS-zwK3tsJMOXAFyc,530
24
+ schemathesis/cli/commands/run/handlers/cassettes.py,sha256=Gu0qcxzvHp1zMY-SVkY96T-Ifwtdh6oj-w0gE1MShnA,19157
25
+ schemathesis/cli/commands/run/handlers/junitxml.py,sha256=FX_347PcHhGLG7XY3eG8VwhB_8tSX4mOtqjZj_s6yLM,2402
26
+ schemathesis/cli/commands/run/handlers/output.py,sha256=e-mPAomU2yhA44EHBoGOSdT6OZ9bvtZ2rIv1JXtO-qI,61726
27
+ schemathesis/cli/ext/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
28
+ schemathesis/cli/ext/fs.py,sha256=3lvoAsEDDdih75ITJJNxemd3nwxX55gGWrI7uDxm0cM,447
29
+ schemathesis/cli/ext/groups.py,sha256=kQ37t6qeArcKaY2y5VxyK3_KwAkBKCVm58IYV8gewds,2720
30
+ schemathesis/cli/ext/options.py,sha256=6yYwZNJL__FCEEL7kI3r5MbVmbp3ZeQjm7DrZ6J_h7s,3347
31
+ schemathesis/config/__init__.py,sha256=Ff-mcdwCatFIS_WpJNpSe-gl7ez0-m_s4F2_4Teg2eM,6240
32
+ schemathesis/config/_auth.py,sha256=83RLVPm97W2thbn-yi01Rt94YwOxLG_a5VoxhEfjUjs,1528
33
+ schemathesis/config/_checks.py,sha256=F0r16eSSiICvoiTUkNNOE2PH73EGd8bikoeZdME_3Yw,10763
34
+ schemathesis/config/_diff_base.py,sha256=-XqS6cTzZC5fplz8_2RSZHDMSAPJhBBIEP6H8wcgHmo,4221
35
+ schemathesis/config/_env.py,sha256=8XfIyrnGNQuCDnfG0lwmKRFbasRUjgeQGBAMupsmtOU,613
36
+ schemathesis/config/_error.py,sha256=TxuuqQ1olwJc7P7ssfxXb1dB_Xn5uVsoazjvYvRxrxA,5437
37
+ schemathesis/config/_generation.py,sha256=_THqCfC20i8RRRsO2hAwoJ52FV-CS1xOA6me3Wp3FHw,5087
38
+ schemathesis/config/_health_check.py,sha256=zC9inla5ibMBlEy5WyM4_TME7ju_KH3Bwfo21RI3Gks,561
39
+ schemathesis/config/_operations.py,sha256=OZMTcfTLef6M8CR9logi6vyaz3XdmZfEMjIobgxjOHA,12181
40
+ schemathesis/config/_output.py,sha256=3G9SOi-4oNcQPHeNRG3HggFCwvcKOW1kF28a9m0H-pU,4434
41
+ schemathesis/config/_parameters.py,sha256=i76Hwaf834fBAMmtKfKTl1SFCicJ-Y-5tZt5QNGW2fA,618
42
+ schemathesis/config/_phases.py,sha256=NFUhn-xzEQdNtgNVW1t51lMquXbjRNGR_QuiCRLCi28,6454
43
+ schemathesis/config/_projects.py,sha256=ddAPTE-uEgjp5SXzQhQoliWtP6feT1ApXPXpsyvdo5I,19367
44
+ schemathesis/config/_rate_limit.py,sha256=ekEW-jP_Ichk_O6hYpj-h2TTTKfp7Fm0nyFUbvlWcbA,456
45
+ schemathesis/config/_report.py,sha256=aYLnPO74B7Wfn_qTwlEp5zY9L74U1XFuYS10yjwKKWY,3885
46
+ schemathesis/config/_validator.py,sha256=IcE8geFZ0ZwR18rkIRs25i7pTl7Z84XbjYGUB-mqReU,258
47
+ schemathesis/config/_warnings.py,sha256=sI0VZcTj3dOnphhBwYwU_KTagxr89HGWTtQ99HcY84k,772
48
+ schemathesis/config/schema.json,sha256=wC1qe9M_fXotfmlBOmW_FCTRw9K5YC814-PipMGKllE,18907
49
+ schemathesis/core/__init__.py,sha256=5fAAKG6BAA5DP9qOUnMT1cG5LLN3tU7D7VdLyb-MxfM,1880
50
+ schemathesis/core/compat.py,sha256=9BWCrFoqN2sJIaiht_anxe8kLjYMR7t0iiOkXqLRUZ8,1058
51
+ schemathesis/core/control.py,sha256=IzwIc8HIAEMtZWW0Q0iXI7T1niBpjvcLlbuwOSmy5O8,130
52
+ schemathesis/core/curl.py,sha256=yuaCe_zHLGwUjEeloQi6W3tOA3cGdnHDNI17-5jia0o,1723
53
+ schemathesis/core/deserialization.py,sha256=ygIj4fNaOd0mJ2IvTsn6bsabBt_2AbSLCz-z9UqfpdQ,2406
54
+ schemathesis/core/errors.py,sha256=hOXoPKlMdaoRp1MRHkrpQs-5BmJt7PMecEcYOAelQe4,16404
55
+ schemathesis/core/failures.py,sha256=MYyRnom-XeUEuBmq2ffdz34xhxmpSHWaQunfHtliVsY,8932
56
+ schemathesis/core/fs.py,sha256=ItQT0_cVwjDdJX9IiI7EnU75NI2H3_DCEyyUjzg_BgI,472
57
+ schemathesis/core/hooks.py,sha256=qhbkkRSf8URJ4LKv2wmKRINKpquUOgxQzWBHKWRWo3Q,475
58
+ schemathesis/core/lazy_import.py,sha256=aMhWYgbU2JOltyWBb32vnWBb6kykOghucEzI_F70yVE,470
59
+ schemathesis/core/loaders.py,sha256=SQQ-8m64-D2FaOgvwKZLyTtLJuzP3RPo7Ud2BERK1c0,3404
60
+ schemathesis/core/marks.py,sha256=SH7jsVuNRJjx2gZN9Ze5MY01u7FJiHeO0iruzKi5rm4,2135
61
+ schemathesis/core/media_types.py,sha256=vV0CEu34sDoZWXvu4R1Y1HosxVS4YXZV8iTov8fU3X0,2148
62
+ schemathesis/core/rate_limit.py,sha256=7tg9Znk11erTfw8-ANutjEmu7hbfUHZx_iEdkoaP174,1757
63
+ schemathesis/core/registries.py,sha256=T4jZB4y3zBHdeSgQc0pRbgSeMblvO-6z4I3zmzIfTi0,811
64
+ schemathesis/core/result.py,sha256=d449YvyONjqjDs-A5DAPgtAI96iT753K8sU6_1HLo2Q,461
65
+ schemathesis/core/transforms.py,sha256=63aeLkR93r3krq4CwYtDcoS_pFBky4L16c9DcFsBHuE,3535
66
+ schemathesis/core/transport.py,sha256=kijYBWjSYoL3EDvfmUwwKS0TsopM_y8MlQ8YK-w0L9U,4534
67
+ schemathesis/core/validation.py,sha256=rnhzsqWukMWyrc7sRm0kZNHTePoPCQ3A4kLpLxrb0jM,1641
68
+ schemathesis/core/version.py,sha256=O-6yFbNocbD4RDwiBZLborxTp54htyKxBWTqpZDnPvg,202
69
+ schemathesis/core/output/__init__.py,sha256=SiHqONFskXl73AtP5dV29L14nZoKo7B-IeG52KZB32M,1446
70
+ schemathesis/core/output/sanitization.py,sha256=Ev3tae8dVwsYd7yVb2_1VBFYs92WFsQ4Eu1fGaymItE,2013
71
+ schemathesis/engine/__init__.py,sha256=QaFE-FinaTAaarteADo2RRMJ-Sz6hZB9TzD5KjMinIA,706
72
+ schemathesis/engine/context.py,sha256=x-I9KX6rO6hdCvvN8FEdzIZBqIcNaxdNYHgQjcXbZhM,3931
73
+ schemathesis/engine/control.py,sha256=QKUOs5VMphe7EcAIro_DDo9ZqdOU6ZVwTU1gMNndHWw,1006
74
+ schemathesis/engine/core.py,sha256=Pnpf1zNTxruUOnnJ9rQ-MskXj4WuA4A27_fWrf0hXWc,5609
75
+ schemathesis/engine/errors.py,sha256=KK76ScUlV7Ce-Gj61kRs_PpaF8zX-4hrzCw3SKQYI28,18797
76
+ schemathesis/engine/events.py,sha256=VV6epicFIJnX4c87fVNSd0ibDccX3gryDv52OUGa3FI,6370
77
+ schemathesis/engine/recorder.py,sha256=K3HfMARrT5mPWXPnYebjjcq5CcsBRhMrtZwEL9_Lvtg,8432
78
+ schemathesis/engine/phases/__init__.py,sha256=zzILnWjoDJQwNmvEmrj3HXVAKT2q7Vb614svjyt8E-U,2794
79
+ schemathesis/engine/phases/probes.py,sha256=-8JdQhMwANTkq64s5h8867oojorM5nUU8P0btdfJne4,5141
80
+ schemathesis/engine/phases/stateful/__init__.py,sha256=Lz1rgNqCfUSIz173XqCGsiMuUI5bh4L-RIFexU1-c_Q,2461
81
+ schemathesis/engine/phases/stateful/_executor.py,sha256=CV4jUuXpV4uSXVJqDI4btnLR8dpzOQVqbv2qVCgE4_s,15182
82
+ schemathesis/engine/phases/stateful/context.py,sha256=A7X1SLDOWFpCvFN9IiIeNVZM0emjqatmJL_k9UsO7vM,2946
83
+ schemathesis/engine/phases/unit/__init__.py,sha256=BvZh39LZmXg90Cy_Tn0cQY5y7eWzYvAEmJ43fGKFAt8,8715
84
+ schemathesis/engine/phases/unit/_executor.py,sha256=jay_D7fmmBTjZigifmY30RiVP5Jb0OlK450fknSWZ_I,16471
85
+ schemathesis/engine/phases/unit/_pool.py,sha256=iU0hdHDmohPnEv7_S1emcabuzbTf-Cznqwn0pGQ5wNQ,2480
86
+ schemathesis/generation/__init__.py,sha256=tvNO2FLiY8z3fZ_kL_QJhSgzXfnT4UqwSXMHCwfLI0g,645
87
+ schemathesis/generation/case.py,sha256=ejglUXCqGYC7IwQkSvpVUPHNYHbYSZWf6kotFNKn-UQ,7516
88
+ schemathesis/generation/coverage.py,sha256=bKP0idU5-eiK4VwhH4kjxDPtCZzMg81mbN1tEDuT6EA,47913
89
+ schemathesis/generation/meta.py,sha256=5ikrlhdk424dWcYLekZSMoWJYRl9_IhI80GKZzhByi4,2512
90
+ schemathesis/generation/metrics.py,sha256=cZU5HdeAMcLFEDnTbNE56NuNq4P0N4ew-g1NEz5-kt4,2836
91
+ schemathesis/generation/modes.py,sha256=Q1fhjWr3zxabU5qdtLvKfpMFZJAwlW9pnxgenjeXTyU,481
92
+ schemathesis/generation/overrides.py,sha256=iPxnxPIKKhO9mwPwKszYv40VM4ylxFJvhzWvrC6qkOE,4385
93
+ schemathesis/generation/hypothesis/__init__.py,sha256=SVwM-rx07jPZzms0idWYACgUtWAxh49HRuTnaQ__zf0,1549
94
+ schemathesis/generation/hypothesis/builder.py,sha256=0BX_UfVqgLaYEk9sikcSeEzYPB7kJfK0Pb7pbZqw4C8,32374
95
+ schemathesis/generation/hypothesis/examples.py,sha256=6eGaKUEC3elmKsaqfKj1sLvM8EHc-PWT4NRBq4NI0Rs,1409
96
+ schemathesis/generation/hypothesis/given.py,sha256=sTZR1of6XaHAPWtHx2_WLlZ50M8D5Rjux0GmWkWjDq4,2337
97
+ schemathesis/generation/hypothesis/reporting.py,sha256=uDVow6Ya8YFkqQuOqRsjbzsbyP4KKfr3jA7ZaY4FuKY,279
98
+ schemathesis/generation/hypothesis/strategies.py,sha256=RurE81E06d99YKG48dizy9346ayfNswYTt38zewmGgw,483
99
+ schemathesis/generation/stateful/__init__.py,sha256=0nx0A1G7MmuGMqrLFNl7SWSvRC0H7PBNTM0DwvPuozU,724
100
+ schemathesis/generation/stateful/state_machine.py,sha256=ScbueD_KRL6wXuAEzdPIVfaV7Hrk2Z_g2cDVKgOgITo,12689
101
+ schemathesis/graphql/__init__.py,sha256=_eO6MAPHGgiADVGRntnwtPxmuvk666sAh-FAU4cG9-0,326
102
+ schemathesis/graphql/checks.py,sha256=IADbxiZjgkBWrC5yzHDtohRABX6zKXk5w_zpWNwdzYo,3186
103
+ schemathesis/graphql/loaders.py,sha256=GbUEsF0MbHZIYo_3pFShjeAM-Yjc2iIfcQsmBqjnNJ8,9236
104
+ schemathesis/openapi/__init__.py,sha256=-KcsSAM19uOM0N5J4s-yTnQ1BFsptYhW1E51cEf6kVM,311
105
+ schemathesis/openapi/checks.py,sha256=5AP_pjTIJ7GcHNhTtGz-IOeoutZ4HqkxyoANrRKf23M,10825
106
+ schemathesis/openapi/loaders.py,sha256=34j6TTwJiMbSlndOfOgqFbK_6QP4zg-NRCNriolklfk,10537
107
+ schemathesis/openapi/generation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
108
+ schemathesis/openapi/generation/filters.py,sha256=EBbgW9zH3wA4d9FyBWp4koiPrrIpNGFnousBDl9qJso,2079
109
+ schemathesis/pytest/__init__.py,sha256=7W0q-Thcw03IAQfXE_Mo8JPZpUdHJzfu85fjK1ZdfQM,88
110
+ schemathesis/pytest/control_flow.py,sha256=F8rAPsPeNv_sJiJgbZYtTpwKWjauZmqFUaKroY2GmQI,217
111
+ schemathesis/pytest/lazy.py,sha256=Wbyn3fYqcmDL7uOFO0PgVpR7--MP8g3Z8q1yArjmDEo,11824
112
+ schemathesis/pytest/loaders.py,sha256=Sbv8e5F77_x4amLP50iwubfm6kpOhx7LhLFGsVXW5Ys,925
113
+ schemathesis/pytest/plugin.py,sha256=aeICgN9NJ14M-EjEv8SKGORH81Wspb4oR-zq51ayXbo,13305
114
+ schemathesis/python/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
115
+ schemathesis/python/asgi.py,sha256=5PyvuTBaivvyPUEi3pwJni91K1kX5Zc0u9c6c1D8a1Q,287
116
+ schemathesis/python/wsgi.py,sha256=uShAgo_NChbfYaV1117e6UHp0MTg7jaR0Sy_to3Jmf8,219
117
+ schemathesis/specs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
118
+ schemathesis/specs/graphql/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
119
+ schemathesis/specs/graphql/_cache.py,sha256=QIcEFy2Koy5K0-u1nB-iab52LDlYsTm_9N5t42GplkM,770
120
+ schemathesis/specs/graphql/nodes.py,sha256=bE3G1kNmqJ8OV4igBvIK-UORrkQA6Nofduf87O3TD9I,541
121
+ schemathesis/specs/graphql/scalars.py,sha256=6lew8mnwhrtg23leiEbG43mLGPLlRln8mClCY94XpDA,2680
122
+ schemathesis/specs/graphql/schemas.py,sha256=3LROUVR81pm5za1VtLTjeb1LF5r8pe_ihXe6Uif2a2Y,14491
123
+ schemathesis/specs/graphql/validation.py,sha256=-W1Noc1MQmTb4RX-gNXMeU2qkgso4mzVfHxtdLkCPKM,1422
124
+ schemathesis/specs/openapi/__init__.py,sha256=C5HOsfuDJGq_3mv8CRBvRvb0Diy1p0BFdqyEXMS-loE,238
125
+ schemathesis/specs/openapi/_cache.py,sha256=HpglmETmZU0RCHxp3DO_sg5_B_nzi54Zuw9vGzzYCxY,4295
126
+ schemathesis/specs/openapi/_hypothesis.py,sha256=IB39ELO6G58OlRyz5pn7RWKSFfSfGezaXhjVy-T3e2w,21491
127
+ schemathesis/specs/openapi/checks.py,sha256=M7gFS9wLSWj9h7uTq4aSd1-e-BykV05uiV-lT5l8BYU,27628
128
+ schemathesis/specs/openapi/constants.py,sha256=JqM_FHOenqS_MuUE9sxVQ8Hnw0DNM8cnKDwCwPLhID4,783
129
+ schemathesis/specs/openapi/converter.py,sha256=lil8IewM5j8tvt4lpA9g_KITvIwx1M96i45DNSHNjoc,3505
130
+ schemathesis/specs/openapi/definitions.py,sha256=8htclglV3fW6JPBqs59lgM4LnA25Mm9IptXBPb_qUT0,93949
131
+ schemathesis/specs/openapi/examples.py,sha256=9dMY4d2WWz32JywKZzyLO5jdbMWcRqjjGHzhMqlqwIs,21129
132
+ schemathesis/specs/openapi/formats.py,sha256=8AIS7Uey-Z1wm1WYRqnsVqHwG9d316PdqfKLqwUs7us,3516
133
+ schemathesis/specs/openapi/media_types.py,sha256=F5M6TKl0s6Z5X8mZpPsWDEdPBvxclKRcUOc41eEwKbo,2472
134
+ schemathesis/specs/openapi/parameters.py,sha256=tVL61gDe9A8_jwoVKZZvpXKPerMyq7vkAvwdMsi44TI,14622
135
+ schemathesis/specs/openapi/patterns.py,sha256=cBj8W4wn7VLJd4nABaIH5f502-zBDiqljxLgPWUn-50,15609
136
+ schemathesis/specs/openapi/references.py,sha256=40YcDExPLR2B8EOwt-Csw-5MYFi2xj_DXf91J0Pc9d4,8855
137
+ schemathesis/specs/openapi/schemas.py,sha256=2AcbX2ABkZZGfhrkbN6ZMvParwRFfpCtIZDZbFutBOs,54928
138
+ schemathesis/specs/openapi/security.py,sha256=6UWYMhL-dPtkTineqqBFNKca1i4EuoTduw-EOLeE0aQ,7149
139
+ schemathesis/specs/openapi/serialization.py,sha256=VdDLmeHqxlWM4cxQQcCkvrU6XurivolwEEaT13ohelA,11972
140
+ schemathesis/specs/openapi/utils.py,sha256=ER4vJkdFVDIE7aKyxyYatuuHVRNutytezgE52pqZNE8,900
141
+ schemathesis/specs/openapi/expressions/__init__.py,sha256=hfuRtXD75tQFhzSo6QgDZ3zByyWeZRKevB8edszAVj4,2272
142
+ schemathesis/specs/openapi/expressions/errors.py,sha256=YLVhps-sYcslgVaahfcUYxUSHlIfWL-rQMeT5PZSMZ8,219
143
+ schemathesis/specs/openapi/expressions/extractors.py,sha256=Py3of3_vBACP4ljiZIcgd-xQCrWIpcMsfQFc0EtAUoA,470
144
+ schemathesis/specs/openapi/expressions/lexer.py,sha256=KFA8Z-Kh1IYUpKgwAnDtEucN9YLLpnFR1GQl8KddWlA,3987
145
+ schemathesis/specs/openapi/expressions/nodes.py,sha256=63LC4mQHy3a0_tKiGIVWaUHu9L9IWilq6R004GLpjyY,4077
146
+ schemathesis/specs/openapi/expressions/parser.py,sha256=e-ZxshrGE_5CVbgcZLYgdGSjdifgyzgKkLQp0dI0cJY,4503
147
+ schemathesis/specs/openapi/negative/__init__.py,sha256=eKiBWsMYjcJ0mNmh07IOnbVMHZ8k-fCidcohwBz8yJ4,3741
148
+ schemathesis/specs/openapi/negative/mutations.py,sha256=MIFVSWbZHW92KhpWruJT3XLisgc-rFnvYasRtwMmExs,19253
149
+ schemathesis/specs/openapi/negative/types.py,sha256=a7buCcVxNBG6ILBM3A7oNTAX0lyDseEtZndBuej8MbI,174
150
+ schemathesis/specs/openapi/negative/utils.py,sha256=ozcOIuASufLqZSgnKUACjX-EOZrrkuNdXX0SDnLoGYA,168
151
+ schemathesis/specs/openapi/stateful/__init__.py,sha256=FSitLbJxjBYU814cqjI_QCkdyoIc-9xfT_1HQcYwsXw,15064
152
+ schemathesis/specs/openapi/stateful/control.py,sha256=QaXLSbwQWtai5lxvvVtQV3BLJ8n5ePqSKB00XFxp-MA,3695
153
+ schemathesis/specs/openapi/stateful/links.py,sha256=8oHpmb-yBa3kZKoCv9ytndpOp80dG1vVis2-EpbkeVA,11432
154
+ schemathesis/transport/__init__.py,sha256=6yg_RfV_9L0cpA6qpbH-SL9_3ggtHQji9CZrpIkbA6s,5321
155
+ schemathesis/transport/asgi.py,sha256=qTClt6oT_xUEWnRHokACN_uqCNNUZrRPT6YG0PjbElY,926
156
+ schemathesis/transport/prepare.py,sha256=c7__wdblBC4zqnmtcs99zoAeEY8jfXiGbdzh74icj6g,4668
157
+ schemathesis/transport/requests.py,sha256=MiMa9Y0db50fKFveipgGA8SMSAvH5ajuaY-fywhm1Eo,8804
158
+ schemathesis/transport/serialization.py,sha256=jIMra1LqRGav0OX3Hx7mvORt38ll4cd2DKit2D58FN0,10531
159
+ schemathesis/transport/wsgi.py,sha256=8i_pR_xOc2qiN6BtEYVetkVrNIFhpvSnO1QtJ-qX2JE,5676
160
+ schemathesis-4.0.0a12.dist-info/METADATA,sha256=W4MVtKBpgG1SsAWaIQPZkhYsamwFln4sW_sbsuJdupU,8494
161
+ schemathesis-4.0.0a12.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
162
+ schemathesis-4.0.0a12.dist-info/entry_points.txt,sha256=hiK3un-xfgPdwj9uj16YVDtTNpO128bmk0U82SMv8ZQ,152
163
+ schemathesis-4.0.0a12.dist-info/licenses/LICENSE,sha256=2Ve4J8v5jMQAWrT7r1nf3bI8Vflk3rZVQefiF2zpxwg,1121
164
+ schemathesis-4.0.0a12.dist-info/RECORD,,
@@ -1,79 +0,0 @@
1
- from __future__ import annotations
2
-
3
- from dataclasses import dataclass
4
- from typing import Sequence
5
-
6
- from schemathesis import experimental
7
- from schemathesis.checks import CHECKS, CheckFunction, ChecksConfig
8
-
9
-
10
- @dataclass
11
- class CheckArguments:
12
- included_check_names: Sequence[str]
13
- excluded_check_names: Sequence[str]
14
- positive_data_acceptance_allowed_statuses: list[str] | None
15
- missing_required_header_allowed_statuses: list[str] | None
16
- negative_data_rejection_allowed_statuses: list[str] | None
17
- max_response_time: float | None
18
-
19
- __slots__ = (
20
- "included_check_names",
21
- "excluded_check_names",
22
- "positive_data_acceptance_allowed_statuses",
23
- "missing_required_header_allowed_statuses",
24
- "negative_data_rejection_allowed_statuses",
25
- "max_response_time",
26
- )
27
-
28
- def into(self) -> tuple[list[CheckFunction], ChecksConfig]:
29
- # Determine selected checks
30
- if "all" in self.included_check_names:
31
- selected_checks = CHECKS.get_all()
32
- else:
33
- selected_checks = CHECKS.get_by_names(self.included_check_names or [])
34
-
35
- # Prepare checks configuration
36
- checks_config: ChecksConfig = {}
37
-
38
- if experimental.POSITIVE_DATA_ACCEPTANCE.is_enabled:
39
- from schemathesis.openapi.checks import PositiveDataAcceptanceConfig
40
- from schemathesis.specs.openapi.checks import positive_data_acceptance
41
-
42
- selected_checks.append(positive_data_acceptance)
43
- if self.positive_data_acceptance_allowed_statuses:
44
- checks_config[positive_data_acceptance] = PositiveDataAcceptanceConfig(
45
- allowed_statuses=self.positive_data_acceptance_allowed_statuses
46
- )
47
-
48
- if self.missing_required_header_allowed_statuses:
49
- from schemathesis.openapi.checks import MissingRequiredHeaderConfig
50
- from schemathesis.specs.openapi.checks import missing_required_header
51
-
52
- selected_checks.append(missing_required_header)
53
- checks_config[missing_required_header] = MissingRequiredHeaderConfig(
54
- allowed_statuses=self.missing_required_header_allowed_statuses
55
- )
56
-
57
- if self.negative_data_rejection_allowed_statuses:
58
- from schemathesis.openapi.checks import NegativeDataRejectionConfig
59
- from schemathesis.specs.openapi.checks import negative_data_rejection
60
-
61
- checks_config[negative_data_rejection] = NegativeDataRejectionConfig(
62
- allowed_statuses=self.negative_data_rejection_allowed_statuses
63
- )
64
-
65
- if self.max_response_time is not None:
66
- from schemathesis.checks import max_response_time as _max_response_time
67
- from schemathesis.core.failures import MaxResponseTimeConfig
68
-
69
- checks_config[_max_response_time] = MaxResponseTimeConfig(self.max_response_time)
70
- selected_checks.append(_max_response_time)
71
-
72
- from schemathesis.specs.openapi.checks import unsupported_method
73
-
74
- selected_checks.append(unsupported_method)
75
-
76
- # Exclude checks based on their names
77
- selected_checks = [check for check in selected_checks if check.__name__ not in self.excluded_check_names]
78
-
79
- return selected_checks, checks_config
@@ -1,78 +0,0 @@
1
- from __future__ import annotations
2
-
3
- from enum import Enum, unique
4
- from typing import TYPE_CHECKING, Any
5
-
6
- if TYPE_CHECKING:
7
- import hypothesis
8
-
9
- HYPOTHESIS_IN_MEMORY_DATABASE_IDENTIFIER = ":memory:"
10
-
11
- # Importing Hypothesis is expensive, hence we re-create the enums we need in CLI commands definitions
12
- # Hypothesis is stable, hence it should not be a problem and adding new variants should not be automatic
13
-
14
-
15
- @unique
16
- class HealthCheck(str, Enum):
17
- # We remove not relevant checks
18
- data_too_large = "data_too_large"
19
- filter_too_much = "filter_too_much"
20
- too_slow = "too_slow"
21
- large_base_example = "large_base_example"
22
- all = "all"
23
-
24
- def as_hypothesis(self) -> list[hypothesis.HealthCheck]:
25
- from hypothesis import HealthCheck
26
-
27
- if self.name == "all":
28
- return list(HealthCheck)
29
-
30
- return [HealthCheck[self.name]]
31
-
32
-
33
- def prepare_health_checks(
34
- hypothesis_suppress_health_check: list[HealthCheck] | None,
35
- ) -> list[hypothesis.HealthCheck] | None:
36
- if hypothesis_suppress_health_check is None:
37
- return None
38
-
39
- return [entry for health_check in hypothesis_suppress_health_check for entry in health_check.as_hypothesis()]
40
-
41
-
42
- def prepare_phases(no_shrink: bool = False) -> list[hypothesis.Phase] | None:
43
- from hypothesis import Phase
44
-
45
- phases = set(Phase) - {Phase.explain}
46
- if no_shrink:
47
- return list(phases - {Phase.shrink})
48
- return list(phases)
49
-
50
-
51
- def prepare_settings(
52
- database: str | None = None,
53
- derandomize: bool | None = None,
54
- max_examples: int | None = None,
55
- phases: list[hypothesis.Phase] | None = None,
56
- suppress_health_check: list[hypothesis.HealthCheck] | None = None,
57
- ) -> hypothesis.settings:
58
- import hypothesis
59
- from hypothesis.database import DirectoryBasedExampleDatabase, InMemoryExampleDatabase
60
-
61
- kwargs: dict[str, Any] = {
62
- key: value
63
- for key, value in (
64
- ("derandomize", derandomize),
65
- ("max_examples", max_examples),
66
- ("phases", phases),
67
- ("suppress_health_check", suppress_health_check),
68
- )
69
- if value is not None
70
- }
71
- if database is not None:
72
- if database.lower() == "none":
73
- kwargs["database"] = None
74
- elif database == HYPOTHESIS_IN_MEMORY_DATABASE_IDENTIFIER:
75
- kwargs["database"] = InMemoryExampleDatabase()
76
- else:
77
- kwargs["database"] = DirectoryBasedExampleDatabase(database)
78
- return hypothesis.settings(print_blob=False, deadline=None, verbosity=hypothesis.Verbosity.quiet, **kwargs)
@@ -1,72 +0,0 @@
1
- from __future__ import annotations
2
-
3
- from enum import Enum
4
- from pathlib import Path
5
-
6
- from click.utils import LazyFile
7
-
8
- DEFAULT_REPORT_DIRECTORY = Path("./schemathesis-report")
9
-
10
-
11
- class ReportFormat(str, Enum):
12
- """Available report formats."""
13
-
14
- JUNIT = "junit"
15
- VCR = "vcr"
16
- HAR = "har"
17
-
18
- @property
19
- def extension(self) -> str:
20
- """File extension for this format."""
21
- return {
22
- self.JUNIT: "xml",
23
- self.VCR: "yaml",
24
- self.HAR: "json",
25
- }[self]
26
-
27
-
28
- class ReportConfig:
29
- """Configuration for test report generation."""
30
-
31
- __slots__ = (
32
- "formats",
33
- "directory",
34
- "junit_path",
35
- "vcr_path",
36
- "har_path",
37
- "preserve_bytes",
38
- "sanitize_output",
39
- )
40
-
41
- def __init__(
42
- self,
43
- formats: list[ReportFormat] | None = None,
44
- directory: Path = DEFAULT_REPORT_DIRECTORY,
45
- *,
46
- junit_path: LazyFile | None = None,
47
- vcr_path: LazyFile | None = None,
48
- har_path: LazyFile | None = None,
49
- preserve_bytes: bool = False,
50
- sanitize_output: bool = True,
51
- ) -> None:
52
- self.formats = formats or []
53
- # Auto-enable formats when paths are specified
54
- if junit_path and ReportFormat.JUNIT not in self.formats:
55
- self.formats.append(ReportFormat.JUNIT)
56
- if vcr_path and ReportFormat.VCR not in self.formats:
57
- self.formats.append(ReportFormat.VCR)
58
- if har_path and ReportFormat.HAR not in self.formats:
59
- self.formats.append(ReportFormat.HAR)
60
- self.directory = directory
61
- self.junit_path = junit_path
62
- self.vcr_path = vcr_path
63
- self.har_path = har_path
64
- self.preserve_bytes = preserve_bytes
65
- self.sanitize_output = sanitize_output
66
-
67
- def get_path(self, format: ReportFormat) -> LazyFile:
68
- """Get the final path for a specific format."""
69
- custom_path = getattr(self, f"{format.value}_path")
70
- if custom_path is not None:
71
- return custom_path
72
- return LazyFile(self.directory / f"{format.value}.{format.extension}", mode="w", encoding="utf-8")