schemathesis 3.28.1__py3-none-any.whl → 3.29.0__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.
- schemathesis/exceptions.py +4 -3
- schemathesis/models.py +2 -10
- schemathesis/runner/impl/core.py +1 -1
- schemathesis/schemas.py +19 -33
- schemathesis/specs/graphql/_cache.py +26 -0
- schemathesis/specs/graphql/schemas.py +79 -46
- schemathesis/specs/openapi/_cache.py +123 -0
- schemathesis/specs/openapi/_hypothesis.py +2 -0
- schemathesis/specs/openapi/links.py +19 -10
- schemathesis/specs/openapi/references.py +17 -6
- schemathesis/specs/openapi/schemas.py +227 -156
- schemathesis/specs/openapi/security.py +3 -5
- schemathesis/specs/openapi/stateful/links.py +5 -5
- schemathesis/transports/content_types.py +2 -0
- {schemathesis-3.28.1.dist-info → schemathesis-3.29.0.dist-info}/METADATA +6 -2
- {schemathesis-3.28.1.dist-info → schemathesis-3.29.0.dist-info}/RECORD +19 -17
- {schemathesis-3.28.1.dist-info → schemathesis-3.29.0.dist-info}/WHEEL +0 -0
- {schemathesis-3.28.1.dist-info → schemathesis-3.29.0.dist-info}/entry_points.txt +0 -0
- {schemathesis-3.28.1.dist-info → schemathesis-3.29.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
from dataclasses import dataclass
|
|
3
|
-
from typing import TYPE_CHECKING, Callable, Dict, List
|
|
3
|
+
from typing import TYPE_CHECKING, Callable, Dict, List, Iterator
|
|
4
4
|
|
|
5
5
|
import hypothesis.strategies as st
|
|
6
6
|
from requests.structures import CaseInsensitiveDict
|
|
@@ -30,7 +30,7 @@ def apply(
|
|
|
30
30
|
connections: APIOperationConnections,
|
|
31
31
|
) -> None:
|
|
32
32
|
"""Gather all connections based on Open API links definitions."""
|
|
33
|
-
all_status_codes =
|
|
33
|
+
all_status_codes = operation.definition.raw["responses"].keys()
|
|
34
34
|
for status_code, link in get_all_links(operation):
|
|
35
35
|
target_operation = link.get_target_operation()
|
|
36
36
|
strategy = bundles[operation.path][operation.method.upper()].filter(
|
|
@@ -47,7 +47,7 @@ def _convert_strategy(
|
|
|
47
47
|
return strategy.map(lambda out: (out, link))
|
|
48
48
|
|
|
49
49
|
|
|
50
|
-
def make_response_filter(status_code: str, all_status_codes:
|
|
50
|
+
def make_response_filter(status_code: str, all_status_codes: Iterator[str]) -> FilterFunction:
|
|
51
51
|
"""Create a filter for stored responses.
|
|
52
52
|
|
|
53
53
|
This filter will decide whether some response is suitable to use as a source for requesting some API operation.
|
|
@@ -76,11 +76,11 @@ def match_status_code(status_code: str) -> FilterFunction:
|
|
|
76
76
|
return compare
|
|
77
77
|
|
|
78
78
|
|
|
79
|
-
def default_status_code(status_codes:
|
|
79
|
+
def default_status_code(status_codes: Iterator[str]) -> FilterFunction:
|
|
80
80
|
"""Create a filter that matches all "default" responses.
|
|
81
81
|
|
|
82
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.
|
|
83
|
+
Therefore, we need to match only responses that were not matched by other listed status codes.
|
|
84
84
|
"""
|
|
85
85
|
expanded_status_codes = {
|
|
86
86
|
status_code for value in status_codes if value != "default" for status_code in expand_status_code(value)
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
from functools import lru_cache
|
|
1
2
|
from typing import Tuple, Generator
|
|
2
3
|
|
|
3
4
|
|
|
@@ -30,6 +31,7 @@ def parse_header(line: str) -> Tuple[str, dict]:
|
|
|
30
31
|
return key, pdict
|
|
31
32
|
|
|
32
33
|
|
|
34
|
+
@lru_cache()
|
|
33
35
|
def parse_content_type(content_type: str) -> Tuple[str, str]:
|
|
34
36
|
"""Parse Content Type and return main type and subtype."""
|
|
35
37
|
try:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: schemathesis
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.29.0
|
|
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
|
|
@@ -50,7 +50,7 @@ Requires-Dist: tomli<3.0,>=2.0.1
|
|
|
50
50
|
Requires-Dist: werkzeug<4,>=0.16.0
|
|
51
51
|
Requires-Dist: yarl<2.0,>=1.5
|
|
52
52
|
Provides-Extra: bench
|
|
53
|
-
Requires-Dist: pytest-codspeed==2.2.
|
|
53
|
+
Requires-Dist: pytest-codspeed==2.2.1; extra == 'bench'
|
|
54
54
|
Provides-Extra: cov
|
|
55
55
|
Requires-Dist: coverage-enable-subprocess; extra == 'cov'
|
|
56
56
|
Requires-Dist: coverage[toml]>=5.3; extra == 'cov'
|
|
@@ -342,6 +342,10 @@ Schemathesis is used by a number of project and companies, including direct usag
|
|
|
342
342
|
|
|
343
343
|
### Articles
|
|
344
344
|
|
|
345
|
+
- [Implementing Schemathesis at PayLead](https://medium.com/paylead/implementing-schemathesis-at-paylead-a469a5d43626) by **Jérémy Pelletier** at **PayLead**
|
|
346
|
+
- **Description**: In-depth walkthrough including custom hooks, stateful testing and CI/CD integration.
|
|
347
|
+
- **Date**: 29 May 2024
|
|
348
|
+
|
|
345
349
|
- [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**
|
|
346
350
|
- **Description**: Demonstrates OpenAPI doc generation with Utoipa and validating it with Schemathesis.
|
|
347
351
|
- **Date**: 01 Jun 2023
|
|
@@ -10,18 +10,18 @@ schemathesis/auths.py,sha256=tUuaHvXO96HJr22Gu9OmlSpL2wbAqKZr3TRbb9dVyA4,14732
|
|
|
10
10
|
schemathesis/checks.py,sha256=SYts1Teecg-5kSHBo32Pzhh7YQ4a1Y7DIfldd-0VTj8,2155
|
|
11
11
|
schemathesis/code_samples.py,sha256=QFwyA7dmc_ij2FRwfbe0uMRm6j2yeofQ8zXynZV3SZI,4122
|
|
12
12
|
schemathesis/constants.py,sha256=gptQZnXJwEJjuLgw62n7LL_kbkE7dhxUgyyJw_dEEAc,2672
|
|
13
|
-
schemathesis/exceptions.py,sha256
|
|
13
|
+
schemathesis/exceptions.py,sha256=J0R6JY1a_uN9o7DwpWLTI_H_qrEEhyc0Tof6eOHLO6g,19875
|
|
14
14
|
schemathesis/failures.py,sha256=oKbIDD075ymLT4h7SQK-herHDT608d-StPX9pXmOSVU,5996
|
|
15
15
|
schemathesis/filters.py,sha256=9SJyZ8mcuDyKG2G1hp2Nfz-TvyJWP_NcntsgwFWYY_Q,10250
|
|
16
16
|
schemathesis/graphql.py,sha256=YkoKWY5K8lxp7H3ikAs-IsoDbiPwJvChG7O8p3DgwtI,229
|
|
17
17
|
schemathesis/hooks.py,sha256=cNJgCh7SyLWT1sYDKF5ncDC80ld08CinvKo2IqLMV4g,12396
|
|
18
18
|
schemathesis/lazy.py,sha256=CivWpvesh4iYLSkatXbQPTEOruWmXvuZQ29gng5p9wM,14846
|
|
19
19
|
schemathesis/loaders.py,sha256=RJnrbf-3vZ7KXmRBkmr3uqWyg0eHzOnONABuudWcTIg,4586
|
|
20
|
-
schemathesis/models.py,sha256=
|
|
20
|
+
schemathesis/models.py,sha256=r26dHwnf-lPo4ayS2UzZjY8jqgYDCQXXQlr_EVsoAxg,43197
|
|
21
21
|
schemathesis/parameters.py,sha256=VheEffVzoSfYaSEcG7KhPlA4ypifosG8biiHifzwL8g,2257
|
|
22
22
|
schemathesis/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
23
23
|
schemathesis/sanitization.py,sha256=WSV_MB5YRrYkp1pQRPHrzsidqsKcqYZiq64N9grKobo,8956
|
|
24
|
-
schemathesis/schemas.py,sha256=
|
|
24
|
+
schemathesis/schemas.py,sha256=EMQ9-2FESOuHkaUtvixc7i7klDgMyQRcjYpq0esqqKg,18005
|
|
25
25
|
schemathesis/serializers.py,sha256=kxXZ-UGa1v_vOm0sC4QYcrNv4rfvI7tHGT2elRVbCbc,11649
|
|
26
26
|
schemathesis/targets.py,sha256=tzp7VZ2-7g2nZHCooRgFzTMtOVcbl0rvtNR421hQthA,1162
|
|
27
27
|
schemathesis/throttling.py,sha256=uwhL4XWPWAU8HECg0NhibfCMn5dT7NElTx3fdL3Mmcc,1065
|
|
@@ -71,7 +71,7 @@ schemathesis/runner/events.py,sha256=eZc4TT8C8mWCMr9h4JvlijvQQ-x8wFry8LntdsYIL-A
|
|
|
71
71
|
schemathesis/runner/probes.py,sha256=t_B38-ljy-p3Odw-dqcZUVIjYTPwBvac8KE5GaLnz4M,5546
|
|
72
72
|
schemathesis/runner/serialization.py,sha256=NkeXNQUvzpnTiT4TbojpUC0QXl2Gjv7quPx5HUxpJXI,17356
|
|
73
73
|
schemathesis/runner/impl/__init__.py,sha256=1E2iME8uthYPBh9MjwVBCTFV-P3fi7AdphCCoBBspjs,199
|
|
74
|
-
schemathesis/runner/impl/core.py,sha256=
|
|
74
|
+
schemathesis/runner/impl/core.py,sha256=CXc-Ibuw5yuW5yG0nlkAN1eiYjS4WfzfOgXmfkf8HlI,39798
|
|
75
75
|
schemathesis/runner/impl/solo.py,sha256=Y_tNhVBVxcuxv65hN0FjxLlVSC41ebHMOM1xSzVrNk8,3358
|
|
76
76
|
schemathesis/runner/impl/threadpool.py,sha256=2-2Wvw7msezZtenZY5vU_x3FGLLVlH-ywvhU9hTwAAo,15073
|
|
77
77
|
schemathesis/service/__init__.py,sha256=cDVTCFD1G-vvhxZkJUwiToTAEQ-0ByIoqwXvJBCf_V8,472
|
|
@@ -89,13 +89,15 @@ schemathesis/service/serialization.py,sha256=OjWG7FfihEl4LtpOD8N-fmjOTzSPUm6A4x6
|
|
|
89
89
|
schemathesis/service/usage.py,sha256=Z-GCwFcW1pS6YdC-ziEOynikqgOttxp2Uyj_dfK5Q7A,2437
|
|
90
90
|
schemathesis/specs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
91
91
|
schemathesis/specs/graphql/__init__.py,sha256=fgyHtvWNUVWismBTOqxQtgLoTighTfvMv6v6QCD_Oyc,85
|
|
92
|
+
schemathesis/specs/graphql/_cache.py,sha256=L8-GSbVFjaQ5QYz8b3dxT5GnNW-H8PbcDasKjAB5SYg,795
|
|
92
93
|
schemathesis/specs/graphql/loaders.py,sha256=5BcHD-w0XU_CRfS53SN4iuGDOfvUfjOfyiRMRGmNDVc,11461
|
|
93
94
|
schemathesis/specs/graphql/nodes.py,sha256=7F5jbk96uTZZXK9Ulr86KpCAn8z6LKMBcrLrdJHggH0,540
|
|
94
95
|
schemathesis/specs/graphql/scalars.py,sha256=W5oj6AcjiXpR-Z6eSSp1oPWl0mjH2NF-w87nRFhrHHg,1805
|
|
95
|
-
schemathesis/specs/graphql/schemas.py,sha256=
|
|
96
|
+
schemathesis/specs/graphql/schemas.py,sha256=qHFgd2ZdBGCAmvqEDq86bjxsQkhsroqUnzLBX3238BA,13491
|
|
96
97
|
schemathesis/specs/graphql/validation.py,sha256=SqQbj9uymGUQxlHXc8HkQccIq25uwP5CvLF1zReb1Xg,1636
|
|
97
98
|
schemathesis/specs/openapi/__init__.py,sha256=HDcx3bqpa6qWPpyMrxAbM3uTo0Lqpg-BUNZhDJSJKnw,279
|
|
98
|
-
schemathesis/specs/openapi/
|
|
99
|
+
schemathesis/specs/openapi/_cache.py,sha256=PAiAu4X_a2PQgD2lG5H3iisXdyg4SaHpU46bRZvfNkM,4320
|
|
100
|
+
schemathesis/specs/openapi/_hypothesis.py,sha256=qWJva0hOWQEiW6awb2PRYI-ipPHGTNsL2TqGZ04FTNA,23404
|
|
99
101
|
schemathesis/specs/openapi/checks.py,sha256=1WB_UGNqptfJThWLUNbds1Q-IzOGbbHCOYPIhBYk-zs,5411
|
|
100
102
|
schemathesis/specs/openapi/constants.py,sha256=JqM_FHOenqS_MuUE9sxVQ8Hnw0DNM8cnKDwCwPLhID4,783
|
|
101
103
|
schemathesis/specs/openapi/converter.py,sha256=9TKeKvNi9MVvoNMfqoPz_cODO8oNrMSTXTOwLLfjD_Q,2799
|
|
@@ -103,13 +105,13 @@ schemathesis/specs/openapi/definitions.py,sha256=t5xffHLBnSgptBdDkSqYN1OfT-DaXoe
|
|
|
103
105
|
schemathesis/specs/openapi/examples.py,sha256=igLDfMpNhRMAk7mYBqi93CtVRQTZCWjCJ2KxlQFotdA,14932
|
|
104
106
|
schemathesis/specs/openapi/filters.py,sha256=Ei-QTFcGCvGSIunT-GYQrtqzB-kqvUePOcUuC7B7mT8,1436
|
|
105
107
|
schemathesis/specs/openapi/formats.py,sha256=JmmkQWNAj5XreXb7Edgj4LADAf4m86YulR_Ec8evpJ4,1220
|
|
106
|
-
schemathesis/specs/openapi/links.py,sha256=
|
|
108
|
+
schemathesis/specs/openapi/links.py,sha256=roBRqrYoXp1sNwpoW8O8l8b3bv3yN2udCzKLSbZo_e0,15152
|
|
107
109
|
schemathesis/specs/openapi/loaders.py,sha256=QoEFJ7fxJz5XcGTEWV_ZGXARiektmyyT_xmVtcHco6Q,24131
|
|
108
110
|
schemathesis/specs/openapi/media_types.py,sha256=dNTxpRQbY3SubdVjh4Cjb38R6Bc9MF9BsRQwPD87x0g,1017
|
|
109
111
|
schemathesis/specs/openapi/parameters.py,sha256=5jMZQZFsZNBFjG22Bqot-Rc65emiSA4E95rIzwImThk,13610
|
|
110
|
-
schemathesis/specs/openapi/references.py,sha256=
|
|
111
|
-
schemathesis/specs/openapi/schemas.py,sha256=
|
|
112
|
-
schemathesis/specs/openapi/security.py,sha256=
|
|
112
|
+
schemathesis/specs/openapi/references.py,sha256=i1Jd8EtEpSpauFW29DQsYM-JvB4jtYI7dpJAJcdjYe0,9276
|
|
113
|
+
schemathesis/specs/openapi/schemas.py,sha256=h3gmeicQC5JhAxts6q8WqSiNZhIEbbZeMd0rPweCqTY,52208
|
|
114
|
+
schemathesis/specs/openapi/security.py,sha256=G7BYbH7zCJ6yJWP_PFYb0pbEfxuQ3-ZFyYoYJqRzwRc,6611
|
|
113
115
|
schemathesis/specs/openapi/serialization.py,sha256=jajqowTIiyEVWEx-Gy4ZinXZewNg0n_ipsGzz7JXP7c,11383
|
|
114
116
|
schemathesis/specs/openapi/utils.py,sha256=gmW4v6o6sZQifajfPquhFeWmZWGQM89mOOBYZvjnE7g,741
|
|
115
117
|
schemathesis/specs/openapi/validation.py,sha256=UJWtW7VTRyMbbBHMRhMwNSUn92k1Hnp4p7IIVqCvqiI,998
|
|
@@ -124,16 +126,16 @@ schemathesis/specs/openapi/negative/mutations.py,sha256=SQjQR5aK-LpbSWzwrtbFX3PQ
|
|
|
124
126
|
schemathesis/specs/openapi/negative/types.py,sha256=a7buCcVxNBG6ILBM3A7oNTAX0lyDseEtZndBuej8MbI,174
|
|
125
127
|
schemathesis/specs/openapi/negative/utils.py,sha256=ozcOIuASufLqZSgnKUACjX-EOZrrkuNdXX0SDnLoGYA,168
|
|
126
128
|
schemathesis/specs/openapi/stateful/__init__.py,sha256=XpPBe0JLK2LUPUTiLn0UE0aWrNwVsbzlhqejVXRGXJM,4448
|
|
127
|
-
schemathesis/specs/openapi/stateful/links.py,sha256=
|
|
129
|
+
schemathesis/specs/openapi/stateful/links.py,sha256=zJ0PdzDhhNEqQU-COgWKmPr1XUzDFYm4AuQL51rHVDo,3548
|
|
128
130
|
schemathesis/stateful/__init__.py,sha256=uo0UuLPuNsf7dK401BaNA8AqvlGXn2cb2FZlhzHmXYk,4909
|
|
129
131
|
schemathesis/stateful/state_machine.py,sha256=ZcKpbvEl1QGhVOYnA7Ow6zkuFHtEPDAyCjroPrj-FgU,11343
|
|
130
132
|
schemathesis/transports/__init__.py,sha256=vQ5pyMefhVpbl0FFXtivGsFHWX-7V1PXNwvqCKMJHoI,11423
|
|
131
133
|
schemathesis/transports/auth.py,sha256=ZKFku9gjhIG6445qNC2p_64Yt9Iz_4azbvja8AMptBk,404
|
|
132
|
-
schemathesis/transports/content_types.py,sha256=
|
|
134
|
+
schemathesis/transports/content_types.py,sha256=PT_LzVAigYbsTOpRGb8DCMhg2o5_E2PhF0I9yd1sYdY,2189
|
|
133
135
|
schemathesis/transports/headers.py,sha256=EDxpm8su0AuhyqZUkMex-OFZMAJN_5NHah7fDT2HDZE,989
|
|
134
136
|
schemathesis/transports/responses.py,sha256=j_-udvWbmi6XtEYmpdX8WoFnlrQ6-i3PSBizfozRjQI,1673
|
|
135
|
-
schemathesis-3.
|
|
136
|
-
schemathesis-3.
|
|
137
|
-
schemathesis-3.
|
|
138
|
-
schemathesis-3.
|
|
139
|
-
schemathesis-3.
|
|
137
|
+
schemathesis-3.29.0.dist-info/METADATA,sha256=suuFIsLrNzGfH44CMN45Oei1tE40OAOEqKc4zdhn99A,17669
|
|
138
|
+
schemathesis-3.29.0.dist-info/WHEEL,sha256=hKi7AIIx6qfnsRbr087vpeJnrVUuDokDHZacPPMW7-Y,87
|
|
139
|
+
schemathesis-3.29.0.dist-info/entry_points.txt,sha256=VHyLcOG7co0nOeuk8WjgpRETk5P1E2iCLrn26Zkn5uk,158
|
|
140
|
+
schemathesis-3.29.0.dist-info/licenses/LICENSE,sha256=PsPYgrDhZ7g9uwihJXNG-XVb55wj2uYhkl2DD8oAzY0,1103
|
|
141
|
+
schemathesis-3.29.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|