schemathesis 3.19.7__py3-none-any.whl → 3.20.1__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 (46) hide show
  1. schemathesis/_compat.py +3 -2
  2. schemathesis/_hypothesis.py +21 -6
  3. schemathesis/_xml.py +177 -0
  4. schemathesis/auths.py +48 -10
  5. schemathesis/cli/__init__.py +77 -19
  6. schemathesis/cli/callbacks.py +42 -18
  7. schemathesis/cli/context.py +2 -1
  8. schemathesis/cli/output/default.py +102 -34
  9. schemathesis/cli/sanitization.py +15 -0
  10. schemathesis/code_samples.py +141 -0
  11. schemathesis/constants.py +1 -24
  12. schemathesis/exceptions.py +127 -26
  13. schemathesis/experimental/__init__.py +85 -0
  14. schemathesis/extra/pytest_plugin.py +10 -4
  15. schemathesis/fixups/__init__.py +8 -2
  16. schemathesis/fixups/fast_api.py +11 -1
  17. schemathesis/fixups/utf8_bom.py +7 -1
  18. schemathesis/hooks.py +63 -0
  19. schemathesis/lazy.py +10 -4
  20. schemathesis/loaders.py +57 -0
  21. schemathesis/models.py +120 -96
  22. schemathesis/parameters.py +3 -0
  23. schemathesis/runner/__init__.py +3 -0
  24. schemathesis/runner/events.py +55 -20
  25. schemathesis/runner/impl/core.py +54 -54
  26. schemathesis/runner/serialization.py +75 -34
  27. schemathesis/sanitization.py +248 -0
  28. schemathesis/schemas.py +21 -6
  29. schemathesis/serializers.py +32 -3
  30. schemathesis/service/serialization.py +5 -1
  31. schemathesis/specs/graphql/loaders.py +44 -13
  32. schemathesis/specs/graphql/schemas.py +56 -25
  33. schemathesis/specs/openapi/_hypothesis.py +11 -23
  34. schemathesis/specs/openapi/definitions.py +572 -0
  35. schemathesis/specs/openapi/loaders.py +100 -49
  36. schemathesis/specs/openapi/parameters.py +2 -2
  37. schemathesis/specs/openapi/schemas.py +87 -13
  38. schemathesis/specs/openapi/security.py +1 -0
  39. schemathesis/stateful.py +2 -2
  40. schemathesis/utils.py +30 -9
  41. schemathesis-3.20.1.dist-info/METADATA +342 -0
  42. {schemathesis-3.19.7.dist-info → schemathesis-3.20.1.dist-info}/RECORD +45 -39
  43. schemathesis-3.19.7.dist-info/METADATA +0 -291
  44. {schemathesis-3.19.7.dist-info → schemathesis-3.20.1.dist-info}/WHEEL +0 -0
  45. {schemathesis-3.19.7.dist-info → schemathesis-3.20.1.dist-info}/entry_points.txt +0 -0
  46. {schemathesis-3.19.7.dist-info → schemathesis-3.20.1.dist-info}/licenses/LICENSE +0 -0
schemathesis/utils.py CHANGED
@@ -2,6 +2,7 @@ import cgi
2
2
  import functools
3
3
  import operator
4
4
  import pathlib
5
+ import random
5
6
  import re
6
7
  import sys
7
8
  import traceback
@@ -38,7 +39,7 @@ from hypothesis.reporting import with_reporter
38
39
  from hypothesis.strategies import SearchStrategy
39
40
  from requests.auth import HTTPDigestAuth
40
41
  from requests.exceptions import InvalidHeader # type: ignore
41
- from requests.utils import CaseInsensitiveDict, check_header_validity, default_headers # type: ignore
42
+ from requests.utils import check_header_validity
42
43
  from werkzeug.wrappers import Response as BaseResponse
43
44
 
44
45
  from ._compat import InferType, JSONMixin, get_signature
@@ -55,13 +56,6 @@ except ImportError:
55
56
  NOT_SET = NotSet()
56
57
 
57
58
 
58
- # These headers are added automatically by Schemathesis or `requests`.
59
- # Do not show them in code samples to make them more readable
60
- IGNORED_HEADERS = CaseInsensitiveDict(
61
- {"Content-Length": None, "Transfer-Encoding": None, "Content-Type": None, **default_headers()} # type: ignore
62
- )
63
-
64
-
65
59
  def file_exists(path: str) -> bool:
66
60
  try:
67
61
  return pathlib.Path(path).is_file()
@@ -70,6 +64,11 @@ def file_exists(path: str) -> bool:
70
64
  return False
71
65
 
72
66
 
67
+ def is_filename(value: str) -> bool:
68
+ """Detect if the input string is a filename by checking its extension."""
69
+ return bool(pathlib.Path(value).suffix)
70
+
71
+
73
72
  def is_latin_1_encodable(value: str) -> bool:
74
73
  """Header values are encoded to latin-1 before sending."""
75
74
  try:
@@ -170,7 +169,7 @@ def format_exception(error: Exception, include_traceback: bool = False) -> str:
170
169
  lines = traceback.format_exception(error_type, error, error.__traceback__)
171
170
  else:
172
171
  lines = traceback.format_exception_only(error_type, error)
173
- return "".join(lines)
172
+ return "".join(lines).strip()
174
173
 
175
174
 
176
175
  def parse_content_type(content_type: str) -> Tuple[str, str]:
@@ -197,6 +196,12 @@ def is_plain_text_media_type(value: str) -> bool:
197
196
  return parse_content_type(value) == ("text", "plain")
198
197
 
199
198
 
199
+ def is_xml_media_type(value: str) -> bool:
200
+ """Detect variations of the ``application/xml`` media type."""
201
+ _, sub = parse_content_type(value)
202
+ return sub == "xml" or sub.endswith("+xml")
203
+
204
+
200
205
  def make_loader(*tags_to_remove: str) -> Type[yaml.SafeLoader]:
201
206
  """Create a YAML loader, that doesn't parse specific tokens into Python objects."""
202
207
  cls: Type[yaml.SafeLoader] = type("YAMLLoader", (SafeLoader,), {})
@@ -273,6 +278,7 @@ def copy_response(response: GenericResponse) -> GenericResponse:
273
278
  if hooks is not None:
274
279
  copied_response.request.hooks["response"] = hooks
275
280
  copied_response.raw = response.raw
281
+ copied_response.verify = getattr(response, "verify", True) # type: ignore[union-attr]
276
282
  return copied_response
277
283
  # Can't deepcopy WSGI response due to generators inside (`response.freeze` doesn't completely help)
278
284
  response.freeze()
@@ -522,3 +528,18 @@ def _fast_deepcopy(value: Any) -> Any:
522
528
  if isinstance(value, list):
523
529
  return [_fast_deepcopy(v) for v in value]
524
530
  return value
531
+
532
+
533
+ CASE_ID_ALPHABET = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
534
+ BASE = len(CASE_ID_ALPHABET)
535
+ # Separate `Random` as Hypothesis might interfere with the default one
536
+ RANDOM = random.Random()
537
+
538
+
539
+ def generate_random_case_id(length: int = 6) -> str:
540
+ number = RANDOM.randint(62 ** (length - 1), 62**length - 1)
541
+ output = ""
542
+ while number > 0:
543
+ number, rem = divmod(number, BASE)
544
+ output += CASE_ID_ALPHABET[rem]
545
+ return output
@@ -0,0 +1,342 @@
1
+ Metadata-Version: 2.1
2
+ Name: schemathesis
3
+ Version: 3.20.1
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 <dadygalo@gmail.com>
11
+ Maintainer-email: Dmitry Dygalo <dadygalo@gmail.com>
12
+ License-Expression: MIT
13
+ License-File: LICENSE
14
+ Keywords: graphql,hypothesis,openapi,pytest,swagger,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.7
24
+ Classifier: Programming Language :: Python :: 3.8
25
+ Classifier: Programming Language :: Python :: 3.9
26
+ Classifier: Programming Language :: Python :: 3.10
27
+ Classifier: Programming Language :: Python :: 3.11
28
+ Classifier: Programming Language :: Python :: Implementation :: CPython
29
+ Classifier: Topic :: Software Development :: Testing
30
+ Requires-Python: >=3.7
31
+ Requires-Dist: backoff<3.0,>=2.1.2
32
+ Requires-Dist: click<9.0,>=7.0
33
+ Requires-Dist: colorama<1.0,>=0.4
34
+ Requires-Dist: httpx<1.0,>=0.22.0
35
+ Requires-Dist: hypothesis-graphql<1,>=0.9.0
36
+ Requires-Dist: hypothesis-jsonschema<0.23,>=0.22.1
37
+ Requires-Dist: hypothesis<7,>=6.31.6
38
+ Requires-Dist: importlib-metadata!=3.8,<5,>=1.1; python_version < '3.8'
39
+ Requires-Dist: jsonschema<5.0,>=4.3.2
40
+ Requires-Dist: junit-xml<2.0,>=1.9
41
+ Requires-Dist: pyrate-limiter<3.0,>=2.10
42
+ Requires-Dist: pytest-subtests<0.8.0,>=0.2.1
43
+ Requires-Dist: pytest<8,>=4.6.4
44
+ Requires-Dist: pyyaml<7.0,>=5.1
45
+ Requires-Dist: requests<3,>=2.22
46
+ Requires-Dist: starlette-testclient==0.2.0
47
+ Requires-Dist: starlette<1,>=0.13
48
+ Requires-Dist: tomli-w<2.0,>=1.0.0
49
+ Requires-Dist: tomli<3.0,>=2.0.1
50
+ Requires-Dist: typing-extensions<5,>=3.7
51
+ Requires-Dist: werkzeug<4,>=0.16.0
52
+ Requires-Dist: yarl<2.0,>=1.5
53
+ Provides-Extra: cov
54
+ Requires-Dist: coverage-enable-subprocess; extra == 'cov'
55
+ Requires-Dist: coverage[toml]>=5.3; extra == 'cov'
56
+ Provides-Extra: dev
57
+ Requires-Dist: schemathesis[cov,docs,tests]; extra == 'dev'
58
+ Provides-Extra: docs
59
+ Requires-Dist: sphinx; extra == 'docs'
60
+ Requires-Dist: sphinx-click; extra == 'docs'
61
+ Requires-Dist: sphinx-rtd-theme; extra == 'docs'
62
+ Provides-Extra: tests
63
+ Requires-Dist: aiohttp<4.0,>=3.8.3; extra == 'tests'
64
+ Requires-Dist: coverage>=6; extra == 'tests'
65
+ Requires-Dist: fastapi>=0.86.0; extra == 'tests'
66
+ Requires-Dist: flask<3.0,>=2.1.1; extra == 'tests'
67
+ Requires-Dist: pydantic>=1.10.2; extra == 'tests'
68
+ Requires-Dist: pytest-asyncio<1.0,>=0.18.0; extra == 'tests'
69
+ Requires-Dist: pytest-httpserver<2.0,>=1.0; extra == 'tests'
70
+ Requires-Dist: pytest-mock<4.0,>=3.7.0; extra == 'tests'
71
+ Requires-Dist: pytest-xdist<4.0,>=3; extra == 'tests'
72
+ Requires-Dist: strawberry-graphql[fastapi]>=0.109.0; extra == 'tests'
73
+ Requires-Dist: trustme<1.0,>=0.9.0; extra == 'tests'
74
+ Description-Content-Type: text/markdown
75
+
76
+ <p align="center">
77
+ <em>Automate your API Testing: catch crashes, validate specs, and save time</em>
78
+ </p>
79
+
80
+ <p align="center">
81
+ <a href="https://github.com/schemathesis/schemathesis/actions" target="_blank">
82
+ <img src="https://github.com/schemathesis/schemathesis/actions/workflows/build.yml/badge.svg" alt="Build">
83
+ </a>
84
+ <a href="https://codecov.io/gh/schemathesis/schemathesis/branch/master" target="_blank">
85
+ <img src="https://codecov.io/gh/schemathesis/schemathesis/branch/master/graph/badge.svg" alt="Coverage">
86
+ </a>
87
+ <a href="https://pypi.org/project/schemathesis/" target="_blank">
88
+ <img src="https://img.shields.io/pypi/v/schemathesis.svg" alt="Version">
89
+ </a>
90
+ <a href="https://pypi.org/project/schemathesis/" target="_blank">
91
+ <img src="https://img.shields.io/pypi/pyversions/schemathesis.svg" alt="Python versions">
92
+ </a>
93
+ <a href="https://discord.gg/R9ASRAmHnA" target="_blank">
94
+ <img src="https://img.shields.io/discord/938139740912369755" alt="Discord">
95
+ </a>
96
+ <a href="https://opensource.org/licenses/MIT" target="_blank">
97
+ <img src="https://img.shields.io/pypi/l/schemathesis.svg" alt="License">
98
+ </a>
99
+ </p>
100
+
101
+ ---
102
+
103
+ **Documentation**: <a href="https://schemathesis.readthedocs.io/en/stable/" target="_blank">https://schemathesis.readthedocs.io/en/stable/ </a>
104
+
105
+ **Chat**: <a href="https://discord.gg/R9ASRAmHnA" target="_blank">https://discord.gg/R9ASRAmHnA </a> - active community support available
106
+
107
+ ---
108
+
109
+ ## Why Schemathesis?
110
+
111
+ Schemathesis focuses on automating your API testing to catch crashes and spec violations. Built on top of the widely-used <a href="https://hypothesis.works/" target="_blank">Hypothesis</a> framework for property-based testing, it offers the following advantages:
112
+
113
+ 🕒 **Time-Saving**
114
+
115
+ Automatically generates test cases, freeing you from manual test writing.
116
+
117
+ 🔍 **Comprehensive**
118
+
119
+ Utilizes fuzzing techniques to probe both common and edge-case scenarios, including those you might overlook.
120
+
121
+ 🛠️ **Flexible**
122
+
123
+ Supports OpenAPI, GraphQL, and can work even with partially complete schemas. Only the parts describing data generation or responses are required.
124
+
125
+ 🎛️ **Customizable**
126
+
127
+ Customize the framework by writing Python extensions to modify almost any aspect of the testing process.
128
+
129
+ 🔄 **Reproducible**
130
+
131
+ Generates code samples to help you quickly replicate and investigate any failing test cases.
132
+
133
+ ## Quick Demo
134
+
135
+ ![image](https://raw.githubusercontent.com/schemathesis/schemathesis/master/img/demo.gif)
136
+
137
+ ## Getting Started
138
+
139
+ Choose from multiple ways to start testing your API with Schemathesis.
140
+
141
+ > 💡 Your API schema can be either a URL or a local path to a JSON/YAML file.
142
+
143
+ ### 💻 Command-Line Interface
144
+
145
+ Quick and easy for those who prefer the command line.
146
+
147
+ **Python**
148
+
149
+ 1. Install via pip: `python -m pip install schemathesis`
150
+ 2. Run tests
151
+
152
+ ```bash
153
+ st run --checks all https://example.schemathesis.io/openapi.json
154
+ ```
155
+
156
+ **Docker**
157
+
158
+ 1. Pull Docker image: `docker pull schemathesis/schemathesis:stable`
159
+ 2. Run tests
160
+
161
+ ```bash
162
+ docker run schemathesis/schemathesis:stable
163
+ run --checks all https://example.schemathesis.io/openapi.json
164
+ ```
165
+
166
+ ### 🐍 Python Library
167
+
168
+ For more control and customization, integrate Schemathesis into your Python codebase.
169
+
170
+ 1. Install via pip: `python -m pip install schemathesis`
171
+ 2. Add to your tests:
172
+
173
+ ```python
174
+ import schemathesis
175
+
176
+ schema = schemathesis.from_uri("https://example.schemathesis.io/openapi.json")
177
+
178
+
179
+ @schema.parametrize()
180
+ def test_api(case):
181
+ case.call_and_validate()
182
+ ```
183
+
184
+ > 💡 See a complete working example project in the [/example](https://github.com/schemathesis/schemathesis/tree/master/example) directory.
185
+
186
+ ### :octocat: GitHub Integration
187
+
188
+ **GitHub Actions**
189
+
190
+ Run Schemathesis tests as a part of your CI/CD pipeline.
191
+
192
+ Add this YAML configuration to your GitHub Actions:
193
+
194
+ ```yaml
195
+ api-tests:
196
+ runs-on: ubuntu-20.04
197
+ steps:
198
+ - uses: schemathesis/action@v1
199
+ with:
200
+ schema: "https://example.schemathesis.io/openapi.json"
201
+ # OPTIONAL. Add Schemathesis.io token for pull request reports
202
+ token: ${{ secrets.SCHEMATHESIS_TOKEN }}
203
+ ```
204
+
205
+ For more details, check out our [GitHub Action](https://github.com/schemathesis/action) repository.
206
+
207
+ **GitHub App**
208
+
209
+ Receive automatic comments in your pull requests and updates on GitHub checks status. Requires usage of our SaaS platform.
210
+
211
+ 1. Install the [GitHub app](https://github.com/apps/schemathesis).
212
+ 2. Enable in your repository settings.
213
+
214
+ ### Software as a Service
215
+
216
+ If you prefer an all-in-one solution with quick setup, we have a [free tier](https://schemathesis.io/#pricing) available.
217
+
218
+ ## How it works
219
+
220
+ Here’s a simplified overview of how Schemathesis operates:
221
+
222
+ 1. **Test Generation**: Using the API schema to create a test generator that you can fine-tune to your testing requirements.
223
+ 2. **Execution and Adaptation**: Sending tests to the API and adapting through statistical models and heuristics to optimize subsequent cases based on responses.
224
+ 3. **Analysis and Minimization**: Checking responses to identify issues. Minimizing means simplifying failing test cases for easier debugging.
225
+ 4. **Stateful Testing**: Running multistep tests to assess API operations in both isolated and integrated scenarios.
226
+ 5. **Reporting**: Generating detailed reports with insights and cURL commands for easy issue reproduction.
227
+
228
+ ### Research Findings on Open-Source API Testing Tools
229
+
230
+ Our study, presented at the **44th International Conference on Software Engineering**, highlighted Schemathesis's performance:
231
+
232
+ - **Defect Detection**: identified a total of **755 bugs** in **16 services**, finding between **1.4× to 4.5× more defects** than the second-best tool in each case.
233
+
234
+ - **High Reliability**: consistently operates seamlessly on any project, ensuring unwavering stability and reliability.
235
+
236
+ Explore the full paper at https://ieeexplore.ieee.org/document/9793781 or pre-print at https://arxiv.org/abs/2112.10328
237
+
238
+ ## Testimonials
239
+
240
+ "_The world needs modern, spec-based API tests, so we can deliver APIs as-designed. Schemathesis is the right tool for that job._"
241
+
242
+ <div>Emmanuel Paraskakis - <strong>Level 250</strong></div>
243
+
244
+ ---
245
+
246
+ "_Schemathesis is the only sane way to thoroughly test an API._"
247
+
248
+ <div>Zdenek Nemec - <strong>superface.ai</strong></div>
249
+
250
+ ---
251
+
252
+ "_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._"
253
+
254
+ <div>Luděk Nový - <strong>JetBrains</strong></div>
255
+
256
+ ---
257
+
258
+ "_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._"
259
+
260
+ <div>Dmitry Misharov - <strong>RedHat</strong></div>
261
+
262
+ ---
263
+
264
+ "_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._"
265
+
266
+ <div>Testing RESTful APIs: A Survey - <strong>a research paper by Golmohammadi, at al</strong></div>
267
+
268
+ ---
269
+
270
+ ## Contributing
271
+
272
+ We welcome contributions in code and are especially interested in learning about your use cases.
273
+ Understanding how you use Schemathesis helps us extend its capabilities to better meet your needs.
274
+
275
+ Feel free to discuss ideas and questions through [GitHub issues](https://github.com/schemathesis/schemathesis/issues) or on our [Discord channel](https://discord.gg/R9ASRAmHnA).
276
+ For more details on how to contribute, see our [contributing guidelines](https://github.com/schemathesis/schemathesis/blob/master/CONTRIBUTING.rst).
277
+
278
+ ## Let's make it better together 🤝
279
+
280
+ Your feedback is essential for improving Schemathesis.
281
+ By sharing your thoughts, you help us develop features that meet your needs and expedite bug fixes.
282
+
283
+ 1. **Why Give Feedback**: Your input directly influences future updates, making the tool more effective for you.
284
+ 2. **How to Provide Feedback**: Use [this form](<(https://forms.gle/kJ4hSxc1Yp6Ga96t5)>) to share your experience.
285
+ 3. **Data Privacy**: We value your privacy. All data is kept confidential and may be used in anonymized form to improve our test suite and documentation.
286
+
287
+ Thank you for contributing to making Schemathesis better! 👍
288
+
289
+ ## Commercial support
290
+
291
+ If you're a large enterprise or startup seeking specialized assistance, we offer commercial support to help you integrate Schemathesis effectively into your workflows.
292
+ This includes:
293
+
294
+ - Quicker response time for your queries.
295
+ - Direct consultation to work closely with your API specification, optimizing the Schemathesis setup for your specific needs.
296
+
297
+ To discuss a custom support arrangement that best suits your organization, please contact our support team at <a href="mailto:support@schemathesis.io">support@schemathesis.io</a>.
298
+
299
+ ## Additional content
300
+
301
+ ### Papers
302
+
303
+ - [Deriving Semantics-Aware Fuzzers from Web API Schemas](https://ieeexplore.ieee.org/document/9793781) by **@Zac-HD** and **@Stranger6667**
304
+ - **Description**: Explores the automation of API testing through semantics-aware fuzzing. Presented at ICSE 2022.
305
+ - **Date**: 20 Dec 2021
306
+
307
+ ### Articles
308
+
309
+ - [Auto-Generating & Validating OpenAPI Docs in Rust: A Streamlined Approach with Utoipa and Schemathesis](https://identeco.de/en/blog/generating_and_validating_openapi_docs_in_rust/) by **identeco**
310
+ - **Description**: Demonstrates OpenAPI doc generation with Utoipa and validating it with Schemathesis.
311
+ - **Date**: 01 Jun 2023
312
+ - [Testing APIFlask with schemathesis](http://blog.pamelafox.org/2023/02/testing-apiflask-with-schemathesis.html) by **@pamelafox**
313
+ - **Description**: Explains how to test APIFlask applications using Schemathesis.
314
+ - **Date**: 27 Feb 2023
315
+ - [Using Hypothesis and Schemathesis to Test FastAPI](https://testdriven.io/blog/fastapi-hypothesis/) by **@amalshaji**
316
+ - **Description**: Discusses property-based testing in FastAPI with Hypothesis and Schemathesis.
317
+ - **Date**: 06 Sep 2022
318
+ - [How to use Schemathesis to test Flask API in GitHub Actions](https://notes.lina-is-here.com/2022/08/04/schemathesis-docker-compose.html) by **@lina-is-here**
319
+ - **Description**: Guides you through setting up Schemathesis with Flask API in GitHub Actions.
320
+ - **Date**: 04 Aug 2022
321
+ - [Using API schemas for property-based testing](https://habr.com/ru/company/oleg-bunin/blog/576496/) (RUS) about Schemathesis by **@Stranger6667**
322
+ - **Description**: Covers the usage of Schemathesis for property-based API testing.
323
+ - **Date**: 07 Sep 2021
324
+ - [Schemathesis: property-based testing for API schemas](https://dygalo.dev/blog/schemathesis-property-based-testing-for-api-schemas/) by **@Stranger6667**
325
+ - **Description**: Introduces property-based testing for OpenAPI schemas using Schemathesis.
326
+ - **Date**: 26 Nov 2019
327
+
328
+ ### Videos
329
+
330
+ - [Schemathesis tutorial](https://appdev.consulting.redhat.com/tracks/contract-first/automated-testing-with-schemathesis.html) with an accompanying [video](https://www.youtube.com/watch?v=4r7OC-lBKMg) by **Red Hat**
331
+ - **Description**: Provides a hands-on tutorial for API testing with Schemathesis.
332
+ - **Date**: 09 Feb 2023
333
+ - [Effective API schemas testing](https://youtu.be/VVLZ25JgjD4) from DevConf.cz by **@Stranger6667**
334
+ - **Description**: Talks about using Schemathesis for property-based API schema testing.
335
+ - **Date**: 24 Mar 2021
336
+ - [API-schema-based testing with schemathesis](https://www.youtube.com/watch?v=9FHRwrv-xuQ) from EuroPython 2020 by **@hultner**
337
+ - **Description**: Introduces property-based API testing with Schemathesis.
338
+ - **Date**: 23 Jul 2020
339
+
340
+ ## License
341
+
342
+ This project is licensed under the terms of the [MIT license](https://opensource.org/licenses/MIT).
@@ -1,56 +1,62 @@
1
1
  schemathesis/__init__.py,sha256=GtEW0EhNpXSxdtVr3wpqYjzATip2EM56FcLxNbvcXeI,1222
2
- schemathesis/_compat.py,sha256=F7SdeJcpenxFe0mNtpddS0yFhJuNaG_e0t6b_AB_t2E,2437
3
- schemathesis/_hypothesis.py,sha256=sDkr53gk3AxskeeNnTaqJ26OHzrAit4ehx1up0tKH_A,5914
4
- schemathesis/auths.py,sha256=CKKRLp5k0qOj4XkcSdNECwgf_Xpsv4U63R8ALFof-rY,13540
2
+ schemathesis/_compat.py,sha256=T9oCxlp2ixHIpmHah6MLpttWiFwkVH301J4n3pdg5u4,2528
3
+ schemathesis/_hypothesis.py,sha256=ZgZ_QULj_GVBQ8cTsfTrWqJEU3cIqW6aCb-KmMRy3qA,6539
4
+ schemathesis/_xml.py,sha256=UJ80xbP7vFXUKaM-fTvpme6xemxUAnNr694hHgZN9CU,6730
5
+ schemathesis/auths.py,sha256=WEuXPZ5CZScKDxNSDEbNUUVgEjm_tAf04tQckBbpixQ,14935
5
6
  schemathesis/checks.py,sha256=-oqV4ncw53lNM81kt6j08_cx-eeSXngKYqPcVDWoEp0,1612
6
- schemathesis/constants.py,sha256=EvMnxDhfZAmQXfO0ZWDA2deRpuL7tiebykQPuF4SuZ4,3279
7
- schemathesis/exceptions.py,sha256=scN97sqnKvwQB4T0GaLcAlMAWqrPv-PhWLJ9Kxl-_PA,8586
7
+ schemathesis/code_samples.py,sha256=dZDbnaXdffjs6FrbUezcJb3cdJLj6eaqgGuUtGiouHk,4009
8
+ schemathesis/constants.py,sha256=Nfixz5BupEj3Vg3GTHolGgOkSqPdQNSMmz7RA-BHKB4,2607
9
+ schemathesis/exceptions.py,sha256=8Y0Nlti5EGdFADlM_AEpd3L18J6mPEftVpmfOLqCMC8,12561
8
10
  schemathesis/failures.py,sha256=YS6yJA5_7036Mxk0C3EMD1dgBiAHWl6a8qDJdx-dK_I,4445
9
11
  schemathesis/filters.py,sha256=cuR7yJzAZ4p9pjnKcD9B061aMQAOJzutg_5HJKNEr0g,9449
10
12
  schemathesis/graphql.py,sha256=YkoKWY5K8lxp7H3ikAs-IsoDbiPwJvChG7O8p3DgwtI,229
11
- schemathesis/hooks.py,sha256=jBlnDMv3guUYOvVppR63CkESdZZfxOkI3CbxuTpnEbA,10145
13
+ schemathesis/hooks.py,sha256=QgLexqXA4jZaA0aYH8xB9Sn8BHxfgRS5JchvZD7fvJc,12389
12
14
  schemathesis/internal.py,sha256=KDFEDOkwGj5gl2yj3PiKjirTzt32kjHd2M8BezdhFHA,155
13
- schemathesis/lazy.py,sha256=ydUeMeUDlfzYXE1_KYU_3w2oDQfhK1IPgNFDgPJv9JU,12729
14
- schemathesis/models.py,sha256=ChY0TKPAbfM7WyVaPiou57TYHeO7IUjlJZMP41plHEI,43244
15
- schemathesis/parameters.py,sha256=e1pV4R9vTKeF5UJ3cx7TIMuxhErwa8x1JgS-QP3O5fk,2591
15
+ schemathesis/lazy.py,sha256=fmutW5lN2O4jaO6NGDBbMdmI-x3D0l9fmJhHU7kxGC4,12974
16
+ schemathesis/loaders.py,sha256=phNiEkJapa-Ol5N9IJUsGX4xklkCECMhqlqgQLCMUv8,2168
17
+ schemathesis/models.py,sha256=vzWppu-ZCA5FxtFKfLCJU4uenQ5a2w6MsibTBqUW1xM,44375
18
+ schemathesis/parameters.py,sha256=vFc6RRt9mWrynVxpRGFTPCGfFnrhF8q6RnTo7u2VXro,2677
16
19
  schemathesis/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
- schemathesis/schemas.py,sha256=DXvWYQB2OynOk_Swb4BCpF82Qe-MQNP8azftH7qcsD8,15206
18
- schemathesis/serializers.py,sha256=RxLZwSU4Zvxk-J36vUtFRUY7H1vNeWC7Kv5Lj1Ru0is,9138
19
- schemathesis/stateful.py,sha256=9z8GxwSFvF-Tf7eaN1iQRrI2HABshf8uTY16xff2Mq8,15009
20
+ schemathesis/sanitization.py,sha256=iC0dyzpBTAP-X6LjiR3bN9xlHD1E4nNao54UrVc9tBM,8961
21
+ schemathesis/schemas.py,sha256=m48Mr95nEFLiV45bECR4rLaVb3ExIfrQ8_hu6yvreEE,15832
22
+ schemathesis/serializers.py,sha256=sQwb78S8Fcx_WFGOVEl7iGxbpViF5rURY2Ev2Tjw8bE,10549
23
+ schemathesis/stateful.py,sha256=K8Lke6fcvf9hcA-KtxBYClbYpK1jO_DX1bmY5qOiinI,15023
20
24
  schemathesis/targets.py,sha256=FnxcZ9SBWgyyD-DQKj-_CbxmkEARc_7ur5Wo8eDPju0,1118
21
25
  schemathesis/throttling.py,sha256=kDU0G75FxzxalcIOnWgeYDPNLoZZpkMjSXYG5cLALmg,942
22
26
  schemathesis/types.py,sha256=ZRJJKTBBucAIvI7d_Wdb4sGQzmg-I0II7rONccncV3E,1043
23
- schemathesis/utils.py,sha256=JJluXGJplOGeWx76YgLBQWWR_cMQU2ihWWvXoRQ393c,16870
24
- schemathesis/cli/__init__.py,sha256=mim_bhkM8jq6_ehDFUMf9ghbu-I4ghN_hRbk6BnbRUE,49288
25
- schemathesis/cli/callbacks.py,sha256=T56YIrDAo_HGMQEkrFWkeIFBZu3-mUvfpO7OR2VFTZs,10707
27
+ schemathesis/utils.py,sha256=my1GuJrG39rolFZ2ml_YrjVHXQvE7bIuV1mi88nzDkM,17471
28
+ schemathesis/cli/__init__.py,sha256=_AKgxyDGZjmIXRfNLUigpRJmoM_bkFdfE9RBl_xyvWs,51482
29
+ schemathesis/cli/callbacks.py,sha256=gXj5U24GeCniwZ2nr9Y3Yxlz3iAyTMRSiSXE539-E6Y,11806
26
30
  schemathesis/cli/cassettes.py,sha256=jarSEWd_p_u1pOsL_-ZnCbciZRbQX5CRZRXUD4GqB7Q,12689
27
31
  schemathesis/cli/constants.py,sha256=OpyINEiuVqdsJ9bn3NOBoQeD-bdxKFbawLKkgahk2uw,63
28
- schemathesis/cli/context.py,sha256=93RfqxDPkSW2S7c3gglOm9Jb7ZMzWzYmqo49k4iKgxk,1363
32
+ schemathesis/cli/context.py,sha256=rSdh40IRe1rtkdjTb38HBUn5Xbb_dqaAK0EY925J7F4,1410
29
33
  schemathesis/cli/debug.py,sha256=CFGNdwGrm3GjAy5zR_MU7PWJIvio9CF5AqYpjh_cyeY,538
30
34
  schemathesis/cli/handlers.py,sha256=rnhFGGYI4z9lKGugj206btJP80isopBzFR1LihfGFuM,293
31
35
  schemathesis/cli/junitxml.py,sha256=7yl3thxc4pvdw54CnE2ox3-VufmibIlBaIJ8HAfkG6k,1700
32
36
  schemathesis/cli/options.py,sha256=gAk_Iy4FCKNTuFKLOYX0TzVcibQSPQaQOen7D45gXmY,2589
37
+ schemathesis/cli/sanitization.py,sha256=9Daci6QXsDaWCEpblvWCpZUtmzXb74ifve-pPfOPL80,616
33
38
  schemathesis/cli/output/__init__.py,sha256=AXaUzQ1nhQ-vXhW4-X-91vE2VQtEcCOrGtQXXNN55iQ,29
34
- schemathesis/cli/output/default.py,sha256=l23UItr0FinAWNzKJrfKVQnITkE3H3i-TF0pX6xUY7U,22984
39
+ schemathesis/cli/output/default.py,sha256=INjXuImgArtMCpHMB_7mQxEe_xM7MfMHizHGxkayI5A,25988
35
40
  schemathesis/cli/output/short.py,sha256=Ui21Ko7eY5igs4CyNFb88-KRXKmMjz776l9aCHpYq8o,1628
36
41
  schemathesis/contrib/__init__.py,sha256=FH8NL8NXgSKBFOF8Jy_EB6T4CJEaiM-tmDhz16B2o4k,187
37
42
  schemathesis/contrib/unique_data.py,sha256=1jer4q8HOvEX6ktXHxSzrqJduXKyYKVhdIqSrR7BHRo,704
38
43
  schemathesis/contrib/openapi/__init__.py,sha256=9jG6b909V2ediVl-yVIIfNqfbNcqLpEMWh20EiDXCdU,120
39
44
  schemathesis/contrib/openapi/formats/__init__.py,sha256=OpHWPW8MkTLVv83QXPYY1HVLflhmSH49hSVefm1oVV0,111
40
45
  schemathesis/contrib/openapi/formats/uuid.py,sha256=xDTFWySI4zmjJ_HkqqKrcVxSwYxXVlHoXy-Z-hcgzPA,348
46
+ schemathesis/experimental/__init__.py,sha256=gVfoWo3dQLJnRojmdGIdraMwvBkXWg9tHnbA9a20WCg,2238
41
47
  schemathesis/extra/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
42
48
  schemathesis/extra/_aiohttp.py,sha256=CtebXNceFdovCImZMGzUel4ypIcDuSuHbYVQXzFo8eI,952
43
49
  schemathesis/extra/_flask.py,sha256=_VEnaEOngLpyyXU7tZ8L2Fpeg1j46c9AvasM8e6R4V4,285
44
50
  schemathesis/extra/_server.py,sha256=wkEe5SUdeA9dmhWR8FCevY8YFRx5vFKwD779e20P0Ek,518
45
- schemathesis/extra/pytest_plugin.py,sha256=nW2o-hRg3BTflpCxPcYV9z3jgO6u4E2eK5dRGY0u1_8,9610
46
- schemathesis/fixups/__init__.py,sha256=SWwgcvCcE7qDUOyuGl0saNYLGR1AkGdF6IbuXI0S764,795
47
- schemathesis/fixups/fast_api.py,sha256=Rq7EAXf0jV2No4jWcIIjkXK04bmVesZtJKIuGF8ZABk,1022
48
- schemathesis/fixups/utf8_bom.py,sha256=YM3HiuvItCZKMir-SVcLt3cTdb_Ek2c6H4gbYYsBI-s,549
49
- schemathesis/runner/__init__.py,sha256=Z_SPevx6RAoT5PTfgzQZS5H_5uzbaiwtpzy-l79nHRk,18180
50
- schemathesis/runner/events.py,sha256=yP4Sur4KURTqsA521sQVMBek2-UkU-7YmMJD2rWdm3I,8440
51
- schemathesis/runner/serialization.py,sha256=ziPWnvQppDLokdO61Bhcsx1OEUnK_0vM07vT7JMJDbc,7126
51
+ schemathesis/extra/pytest_plugin.py,sha256=ka9fXOy7YP0KPNpbmpSumGbCoqV-Ip81ZpQWyAtfbAg,9777
52
+ schemathesis/fixups/__init__.py,sha256=bCJoFaBLJXinwzd5G_Puvhrs7No58LcR6JzU2a2EwpI,947
53
+ schemathesis/fixups/fast_api.py,sha256=goCFkVewbH5pr13k5NnLzLn_yyGZnKjVvYqHtaGfjto,1279
54
+ schemathesis/fixups/utf8_bom.py,sha256=fE2xbfHN_ljK8fgooJDjJyl49myb65OhP-Fi1jXkSdI,711
55
+ schemathesis/runner/__init__.py,sha256=ULJLvMYWgW3yIc69Jm5p9MZYNpYvkkqz9O9pwKBQMq0,18310
56
+ schemathesis/runner/events.py,sha256=8v2lXxnP0gEHsSFHDEDcW2zcu4H3KMDR-GmzIf-7NGM,8879
57
+ schemathesis/runner/serialization.py,sha256=UotMQwtoTlrY1dHFVN86CrmgWhFYG5YoMxVi66mVwkQ,8380
52
58
  schemathesis/runner/impl/__init__.py,sha256=1E2iME8uthYPBh9MjwVBCTFV-P3fi7AdphCCoBBspjs,199
53
- schemathesis/runner/impl/core.py,sha256=jmpay7t-vQgvURkmUmoOkC-f7woBTU8Opfq-Fnj75PA,32307
59
+ schemathesis/runner/impl/core.py,sha256=5-uKsVCkHXf9-I6uvcsCMT4Q2Vo8gPfemG4jGHp_aLw,32292
54
60
  schemathesis/runner/impl/solo.py,sha256=FDhZu6s34CTDHMf4nNlAcBAwzouDEZBxqkXEI_lFrHk,2999
55
61
  schemathesis/runner/impl/threadpool.py,sha256=a9yAmbNhd4CIOC_3E3uoegVExD5orVrzVGnqANjL5fM,14347
56
62
  schemathesis/service/__init__.py,sha256=cJLwStsKelQDCnOjGnwL50oQJrOrCykpk4qJD84mGLU,506
@@ -63,28 +69,28 @@ schemathesis/service/hosts.py,sha256=_oCbUZGnnd7-WF0J9vBbYBkYezTtjK8bjLHP6o2GGrQ
63
69
  schemathesis/service/metadata.py,sha256=ZFyzmdMzf-UcAtj_YMwhGn435hWmBvi0Un4vSwEmkPI,1243
64
70
  schemathesis/service/models.py,sha256=xh1snR_UFeZOKMp6utoWQM3MXUQRloLJ0Ii9N9gvlCs,341
65
71
  schemathesis/service/report.py,sha256=bAtv-GaUzh5huud9wuz9ESs40vkif2PBUYREEnpC5O0,8194
66
- schemathesis/service/serialization.py,sha256=qow9VJSiKJ5Pwd0_YNfWhI_xg2TMvzmM3SvYcVYCldI,6807
72
+ schemathesis/service/serialization.py,sha256=sKifF8g4pXR44QOpa31p_x2WCY6e1uDPRdxfYKLKlfg,6919
67
73
  schemathesis/service/usage.py,sha256=tIsF59Pb-2IHhPnfm5IK6ABE32MwcUZPveUVlqf8PeE,2401
68
74
  schemathesis/specs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
69
75
  schemathesis/specs/graphql/__init__.py,sha256=fgyHtvWNUVWismBTOqxQtgLoTighTfvMv6v6QCD_Oyc,85
70
- schemathesis/specs/graphql/loaders.py,sha256=8s0VdpBuA1vYF339qshBLj7Tc17XcUcp98DUqqJ9HGk,8638
76
+ schemathesis/specs/graphql/loaders.py,sha256=fiLgZAzEkiYzvczSAUIgH4hVprT4tk3FbgJ26KIqmcU,9837
71
77
  schemathesis/specs/graphql/nodes.py,sha256=JFmmV4OXGgUnSEEcOJ5ifVlChEPefLov7PwMknQyO2A,146
72
78
  schemathesis/specs/graphql/scalars.py,sha256=L0szUzqDWAXo2F0srgit4KwIZZXHP7K_bZS2M6dNkI0,826
73
- schemathesis/specs/graphql/schemas.py,sha256=jTdJkLdQNa6kQGYu0wTjaIqKjejwtSNc2K_zlEkJdW0,8583
79
+ schemathesis/specs/graphql/schemas.py,sha256=kGxGf_-xCUfscuayqZzrbF9zc3SyMoNWckq9Ps7oxr8,9549
74
80
  schemathesis/specs/openapi/__init__.py,sha256=Wze9HCPpUHJzhPXO-lHox7OaFJ-lfnJs-CQtCv8231g,228
75
- schemathesis/specs/openapi/_hypothesis.py,sha256=75r-pI5xgD0oLmyk3k5Vu3jH4QEDcmlLqo3eTjJ2d7Y,22596
81
+ schemathesis/specs/openapi/_hypothesis.py,sha256=8RIKBN_nSumbEYPbfvVtBQWUi5-TsgqNiKoNLkIZB2E,22159
76
82
  schemathesis/specs/openapi/checks.py,sha256=dLBZmC63-MBk9-B13dy8O_pvrlu0Z3jyyiM5RkMCXzM,5359
77
83
  schemathesis/specs/openapi/constants.py,sha256=JqM_FHOenqS_MuUE9sxVQ8Hnw0DNM8cnKDwCwPLhID4,783
78
84
  schemathesis/specs/openapi/converter.py,sha256=Al_x0p0rWiI6jhtLc8yTR9flYr5xt_fE6YYqjH04eqo,2612
79
- schemathesis/specs/openapi/definitions.py,sha256=-KzyE7e4Sa5HCce6aPXy607giVXCYC357k4-rqeb9zQ,65266
85
+ schemathesis/specs/openapi/definitions.py,sha256=V0CZCOTBWWqVlbhwzGzROyZhIp_JiYYpNFG29ONLLc0,93518
80
86
  schemathesis/specs/openapi/examples.py,sha256=LfWn2bDUzpPGg6av3w7uO5JP5_u5pJM39t5lLwXD4Co,9049
81
87
  schemathesis/specs/openapi/filters.py,sha256=n2F4tV_j1RBTBfQj_n9AbIiZKw0gpV0xHX7EJS5raF4,1335
82
88
  schemathesis/specs/openapi/links.py,sha256=2wmP-vgO__YPLKuA18B_9S_puO2tuqlxGxzwIwyvBKk,14486
83
- schemathesis/specs/openapi/loaders.py,sha256=Klnztd5F4ug3RtXepxvnAnZFC90n9p7we2_PfHvcdFI,19043
84
- schemathesis/specs/openapi/parameters.py,sha256=wqDQU_-0qaA12kSjo-ESDgE4BAYOoX1tfNUmneL4nPA,15005
89
+ schemathesis/specs/openapi/loaders.py,sha256=8UJwYRsW7nXgNxn0Sn6r-Lx9z5GJyl9feqZY95LQT8E,21158
90
+ schemathesis/specs/openapi/parameters.py,sha256=kjqfx8RuqiR7Gt2MsKm0WLsFF-GPBMnWNHe_CvGg9iM,15019
85
91
  schemathesis/specs/openapi/references.py,sha256=4NrUuQFapB-bO9drgrCyteSnT5DZlfKuAWT7HIVQZtc,8694
86
- schemathesis/specs/openapi/schemas.py,sha256=C51ST5OB7xBbReK7up8-bqqkftqPagj-9T17GdOitlk,41975
87
- schemathesis/specs/openapi/security.py,sha256=vGtMitfVN1Fv4b3vIIMgAPc_2o69gOmrXZgkBj1gt9A,6452
92
+ schemathesis/specs/openapi/schemas.py,sha256=Ztwr5Sg3OcR8vbYFIynE0BbTjhzyegwo8y0lS-dNBFc,45171
93
+ schemathesis/specs/openapi/security.py,sha256=3V6R0-XIT-Pr0s80aUJ2diyz9Qr1prisVNdYvXTF35s,6485
88
94
  schemathesis/specs/openapi/serialization.py,sha256=cTt5NsF_dipmAVqoYJvxq9uuL-cn_EBL7iJGkhzx7Lo,11449
89
95
  schemathesis/specs/openapi/utils.py,sha256=Dublwaz5EXNLDlzDLQPaBF3c8VNnrkv0cPqbcu9Kqzo,731
90
96
  schemathesis/specs/openapi/validation.py,sha256=AFLSS9P8yGvhONP9QfieoAAjHqfMPl5wvtPT71TFPQk,989
@@ -100,8 +106,8 @@ schemathesis/specs/openapi/negative/types.py,sha256=a7buCcVxNBG6ILBM3A7oNTAX0lyD
100
106
  schemathesis/specs/openapi/negative/utils.py,sha256=ozcOIuASufLqZSgnKUACjX-EOZrrkuNdXX0SDnLoGYA,168
101
107
  schemathesis/specs/openapi/stateful/__init__.py,sha256=CS8yxgIwvbiGkvav4xEPYkKOIhVK4-xpUAv7U45nW8M,4466
102
108
  schemathesis/specs/openapi/stateful/links.py,sha256=yrTHH6kdPhM2WpxksyfShf98mkb8ZP6fjXFyTzUbXfo,3487
103
- schemathesis-3.19.7.dist-info/METADATA,sha256=Z__aqfqGnjUBuM-JN06ZcoaB-ZQYsTihmm3YSnQb0tQ,13346
104
- schemathesis-3.19.7.dist-info/WHEEL,sha256=hKi7AIIx6qfnsRbr087vpeJnrVUuDokDHZacPPMW7-Y,87
105
- schemathesis-3.19.7.dist-info/entry_points.txt,sha256=VHyLcOG7co0nOeuk8WjgpRETk5P1E2iCLrn26Zkn5uk,158
106
- schemathesis-3.19.7.dist-info/licenses/LICENSE,sha256=PsPYgrDhZ7g9uwihJXNG-XVb55wj2uYhkl2DD8oAzY0,1103
107
- schemathesis-3.19.7.dist-info/RECORD,,
109
+ schemathesis-3.20.1.dist-info/METADATA,sha256=9O5hlIPaqD6oHzMCX-3NpVMWn9t-BVN2ul1q6U4fzUw,15118
110
+ schemathesis-3.20.1.dist-info/WHEEL,sha256=hKi7AIIx6qfnsRbr087vpeJnrVUuDokDHZacPPMW7-Y,87
111
+ schemathesis-3.20.1.dist-info/entry_points.txt,sha256=VHyLcOG7co0nOeuk8WjgpRETk5P1E2iCLrn26Zkn5uk,158
112
+ schemathesis-3.20.1.dist-info/licenses/LICENSE,sha256=PsPYgrDhZ7g9uwihJXNG-XVb55wj2uYhkl2DD8oAzY0,1103
113
+ schemathesis-3.20.1.dist-info/RECORD,,