schemathesis 4.0.11__py3-none-any.whl → 4.0.12__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/generation/case.py +18 -9
- schemathesis/transport/prepare.py +3 -0
- {schemathesis-4.0.11.dist-info → schemathesis-4.0.12.dist-info}/METADATA +1 -1
- {schemathesis-4.0.11.dist-info → schemathesis-4.0.12.dist-info}/RECORD +7 -7
- {schemathesis-4.0.11.dist-info → schemathesis-4.0.12.dist-info}/WHEEL +0 -0
- {schemathesis-4.0.11.dist-info → schemathesis-4.0.12.dist-info}/entry_points.txt +0 -0
- {schemathesis-4.0.11.dist-info → schemathesis-4.0.12.dist-info}/licenses/LICENSE +0 -0
schemathesis/generation/case.py
CHANGED
@@ -207,15 +207,24 @@ class Case:
|
|
207
207
|
transport_ = transport.get(kwargs["app"])
|
208
208
|
else:
|
209
209
|
transport_ = self.operation.schema.transport
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
210
|
+
try:
|
211
|
+
response = transport_.send(
|
212
|
+
self,
|
213
|
+
session=session,
|
214
|
+
base_url=base_url,
|
215
|
+
headers=headers,
|
216
|
+
params=params,
|
217
|
+
cookies=cookies,
|
218
|
+
**kwargs,
|
219
|
+
)
|
220
|
+
except Exception as exc:
|
221
|
+
# May happen in ASGI / WSGI apps
|
222
|
+
if not hasattr(exc, "__notes__"):
|
223
|
+
exc.__notes__ = [] # type: ignore[attr-defined]
|
224
|
+
verify = kwargs.get("verify", True)
|
225
|
+
curl = self.as_curl_command(headers=headers, verify=verify)
|
226
|
+
exc.__notes__.append(f"\nReproduce with: \n\n {curl}") # type: ignore[attr-defined]
|
227
|
+
raise
|
219
228
|
dispatch("after_call", hook_context, self, response)
|
220
229
|
return response
|
221
230
|
|
@@ -113,10 +113,13 @@ def prepare_request(case: Case, headers: Mapping[str, Any] | None, *, config: Sa
|
|
113
113
|
kwargs = REQUESTS_TRANSPORT.serialize_case(case, base_url=base_url, headers=headers)
|
114
114
|
if config.enabled:
|
115
115
|
kwargs["url"] = sanitize_url(kwargs["url"], config=config)
|
116
|
+
kwargs["headers"] = dict(kwargs["headers"])
|
116
117
|
sanitize_value(kwargs["headers"], config=config)
|
117
118
|
if kwargs["cookies"]:
|
119
|
+
kwargs["cookies"] = dict(kwargs["cookies"])
|
118
120
|
sanitize_value(kwargs["cookies"], config=config)
|
119
121
|
if kwargs["params"]:
|
122
|
+
kwargs["params"] = dict(kwargs["params"])
|
120
123
|
sanitize_value(kwargs["params"], config=config)
|
121
124
|
|
122
125
|
return requests.Request(**kwargs).prepare()
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: schemathesis
|
3
|
-
Version: 4.0.
|
3
|
+
Version: 4.0.12
|
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://github.com/schemathesis/schemathesis/blob/master/CHANGELOG.md
|
@@ -84,7 +84,7 @@ schemathesis/engine/phases/unit/__init__.py,sha256=BvZh39LZmXg90Cy_Tn0cQY5y7eWzY
|
|
84
84
|
schemathesis/engine/phases/unit/_executor.py,sha256=9MmZoKSBVSPk0LWwN3PZ3iaO9nzpT1Z70yzdEE48YYw,16489
|
85
85
|
schemathesis/engine/phases/unit/_pool.py,sha256=iU0hdHDmohPnEv7_S1emcabuzbTf-Cznqwn0pGQ5wNQ,2480
|
86
86
|
schemathesis/generation/__init__.py,sha256=tvNO2FLiY8z3fZ_kL_QJhSgzXfnT4UqwSXMHCwfLI0g,645
|
87
|
-
schemathesis/generation/case.py,sha256=
|
87
|
+
schemathesis/generation/case.py,sha256=zwAwFQ-Fp7SOxCXYOQyAdwAtNwVJe63PdLpvqackFQY,12296
|
88
88
|
schemathesis/generation/coverage.py,sha256=0d52xHf1HUbilPmCeJlplnw7knSdc0lEv4Hr0HXYUTE,49949
|
89
89
|
schemathesis/generation/meta.py,sha256=adkoMuCfzSjHJ9ZDocQn0GnVldSCkLL3eVR5A_jafwM,2552
|
90
90
|
schemathesis/generation/metrics.py,sha256=cZU5HdeAMcLFEDnTbNE56NuNq4P0N4ew-g1NEz5-kt4,2836
|
@@ -153,12 +153,12 @@ schemathesis/specs/openapi/stateful/control.py,sha256=QaXLSbwQWtai5lxvvVtQV3BLJ8
|
|
153
153
|
schemathesis/specs/openapi/stateful/links.py,sha256=h5q40jUbcIk5DS_Tih1cvFJxS_QxxG0_9ZQnTs1A_zo,8806
|
154
154
|
schemathesis/transport/__init__.py,sha256=6yg_RfV_9L0cpA6qpbH-SL9_3ggtHQji9CZrpIkbA6s,5321
|
155
155
|
schemathesis/transport/asgi.py,sha256=qTClt6oT_xUEWnRHokACN_uqCNNUZrRPT6YG0PjbElY,926
|
156
|
-
schemathesis/transport/prepare.py,sha256=
|
156
|
+
schemathesis/transport/prepare.py,sha256=erYXRaxpQokIDzaIuvt_csHcw72iHfCyNq8VNEzXd0o,4743
|
157
157
|
schemathesis/transport/requests.py,sha256=rziZTrZCVMAqgy6ldB8iTwhkpAsnjKSgK8hj5Sq3ThE,10656
|
158
158
|
schemathesis/transport/serialization.py,sha256=igUXKZ_VJ9gV7P0TUc5PDQBJXl_s0kK9T3ljGWWvo6E,10339
|
159
159
|
schemathesis/transport/wsgi.py,sha256=KoAfvu6RJtzyj24VGB8e-Iaa9smpgXJ3VsM8EgAz2tc,6152
|
160
|
-
schemathesis-4.0.
|
161
|
-
schemathesis-4.0.
|
162
|
-
schemathesis-4.0.
|
163
|
-
schemathesis-4.0.
|
164
|
-
schemathesis-4.0.
|
160
|
+
schemathesis-4.0.12.dist-info/METADATA,sha256=78zt_-8O1SSPvAASeKxQkRRFrEqKcVKvvXZ7x2fP0RE,8472
|
161
|
+
schemathesis-4.0.12.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
162
|
+
schemathesis-4.0.12.dist-info/entry_points.txt,sha256=hiK3un-xfgPdwj9uj16YVDtTNpO128bmk0U82SMv8ZQ,152
|
163
|
+
schemathesis-4.0.12.dist-info/licenses/LICENSE,sha256=2Ve4J8v5jMQAWrT7r1nf3bI8Vflk3rZVQefiF2zpxwg,1121
|
164
|
+
schemathesis-4.0.12.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|