schemathesis 4.3.8__py3-none-any.whl → 4.3.9__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.
Potentially problematic release.
This version of schemathesis might be problematic. Click here for more details.
- schemathesis/generation/coverage.py +15 -0
- schemathesis/generation/hypothesis/builder.py +0 -1
- {schemathesis-4.3.8.dist-info → schemathesis-4.3.9.dist-info}/METADATA +1 -1
- {schemathesis-4.3.8.dist-info → schemathesis-4.3.9.dist-info}/RECORD +7 -7
- {schemathesis-4.3.8.dist-info → schemathesis-4.3.9.dist-info}/WHEEL +0 -0
- {schemathesis-4.3.8.dist-info → schemathesis-4.3.9.dist-info}/entry_points.txt +0 -0
- {schemathesis-4.3.8.dist-info → schemathesis-4.3.9.dist-info}/licenses/LICENSE +0 -0
|
@@ -7,6 +7,8 @@ from dataclasses import dataclass
|
|
|
7
7
|
from functools import lru_cache, partial
|
|
8
8
|
from itertools import combinations
|
|
9
9
|
|
|
10
|
+
from schemathesis.core.jsonschema.bundler import BUNDLE_STORAGE_KEY
|
|
11
|
+
|
|
10
12
|
try:
|
|
11
13
|
from json.encoder import _make_iterencode # type: ignore[attr-defined]
|
|
12
14
|
except ImportError:
|
|
@@ -346,6 +348,19 @@ class CoverageContext:
|
|
|
346
348
|
if isinstance(schema, dict) and "examples" in schema:
|
|
347
349
|
# Examples may contain binary data which will fail the canonicalisation process in `hypothesis-jsonschema`
|
|
348
350
|
schema = {key: value for key, value in schema.items() if key != "examples"}
|
|
351
|
+
# Prevent some hard to satisfy schemas
|
|
352
|
+
if isinstance(schema, dict) and schema.get("additionalProperties") is False and "required" in schema:
|
|
353
|
+
# Set required properties to any value to simplify generation
|
|
354
|
+
schema = dict(schema)
|
|
355
|
+
properties = schema.setdefault("properties", {})
|
|
356
|
+
for key in schema["required"]:
|
|
357
|
+
properties.setdefault(key, {})
|
|
358
|
+
|
|
359
|
+
# Add bundled schemas if any
|
|
360
|
+
if isinstance(schema, dict) and BUNDLE_STORAGE_KEY in self.root_schema:
|
|
361
|
+
schema = dict(schema)
|
|
362
|
+
schema[BUNDLE_STORAGE_KEY] = self.root_schema[BUNDLE_STORAGE_KEY]
|
|
363
|
+
|
|
349
364
|
return self.generate_from(from_schema(schema, custom_formats=self.custom_formats))
|
|
350
365
|
|
|
351
366
|
|
|
@@ -529,7 +529,6 @@ def _iter_coverage_cases(
|
|
|
529
529
|
|
|
530
530
|
instant = Instant()
|
|
531
531
|
responses = list(operation.responses.iter_examples())
|
|
532
|
-
# NOTE: The HEAD method is excluded
|
|
533
532
|
custom_formats = _build_custom_formats(generation_config)
|
|
534
533
|
|
|
535
534
|
seen_negative = coverage.HashSet()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: schemathesis
|
|
3
|
-
Version: 4.3.
|
|
3
|
+
Version: 4.3.9
|
|
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
|
|
@@ -93,13 +93,13 @@ schemathesis/engine/phases/unit/_executor.py,sha256=YDibV3lkC2UMHLvh1FSmnlaQ-SJS
|
|
|
93
93
|
schemathesis/engine/phases/unit/_pool.py,sha256=iU0hdHDmohPnEv7_S1emcabuzbTf-Cznqwn0pGQ5wNQ,2480
|
|
94
94
|
schemathesis/generation/__init__.py,sha256=tvNO2FLiY8z3fZ_kL_QJhSgzXfnT4UqwSXMHCwfLI0g,645
|
|
95
95
|
schemathesis/generation/case.py,sha256=SLMw6zkzmeiZdaIij8_0tjTF70BrMlRSWREaqWii0uM,12508
|
|
96
|
-
schemathesis/generation/coverage.py,sha256=
|
|
96
|
+
schemathesis/generation/coverage.py,sha256=3eU3HaHr_FCodATskfQ1k4_HHR3z_Pf0Gk_IcVGxLyU,60415
|
|
97
97
|
schemathesis/generation/meta.py,sha256=tXhUZBEdpQMn68uMx1SW8Vv59Uf6Wl6yzs-VB9lu_8o,2589
|
|
98
98
|
schemathesis/generation/metrics.py,sha256=cZU5HdeAMcLFEDnTbNE56NuNq4P0N4ew-g1NEz5-kt4,2836
|
|
99
99
|
schemathesis/generation/modes.py,sha256=Q1fhjWr3zxabU5qdtLvKfpMFZJAwlW9pnxgenjeXTyU,481
|
|
100
100
|
schemathesis/generation/overrides.py,sha256=xI2djHsa42fzP32xpxgxO52INixKagf5DjDAWJYswM8,3890
|
|
101
101
|
schemathesis/generation/hypothesis/__init__.py,sha256=68BHULoXQC1WjFfw03ga5lvDGZ-c-J7H_fNEuUzFWRw,4976
|
|
102
|
-
schemathesis/generation/hypothesis/builder.py,sha256=
|
|
102
|
+
schemathesis/generation/hypothesis/builder.py,sha256=wOCjNAScpiN-wJ4EM0QnJ_5o9nczW0WILFNfIR1qeKQ,38480
|
|
103
103
|
schemathesis/generation/hypothesis/examples.py,sha256=6eGaKUEC3elmKsaqfKj1sLvM8EHc-PWT4NRBq4NI0Rs,1409
|
|
104
104
|
schemathesis/generation/hypothesis/given.py,sha256=sTZR1of6XaHAPWtHx2_WLlZ50M8D5Rjux0GmWkWjDq4,2337
|
|
105
105
|
schemathesis/generation/hypothesis/reporting.py,sha256=uDVow6Ya8YFkqQuOqRsjbzsbyP4KKfr3jA7ZaY4FuKY,279
|
|
@@ -179,8 +179,8 @@ schemathesis/transport/prepare.py,sha256=erYXRaxpQokIDzaIuvt_csHcw72iHfCyNq8VNEz
|
|
|
179
179
|
schemathesis/transport/requests.py,sha256=wriRI9fprTplE_qEZLEz1TerX6GwkE3pwr6ZnU2o6vQ,10648
|
|
180
180
|
schemathesis/transport/serialization.py,sha256=GwO6OAVTmL1JyKw7HiZ256tjV4CbrRbhQN0ep1uaZwI,11157
|
|
181
181
|
schemathesis/transport/wsgi.py,sha256=kQtasFre6pjdJWRKwLA_Qb-RyQHCFNpaey9ubzlFWKI,5907
|
|
182
|
-
schemathesis-4.3.
|
|
183
|
-
schemathesis-4.3.
|
|
184
|
-
schemathesis-4.3.
|
|
185
|
-
schemathesis-4.3.
|
|
186
|
-
schemathesis-4.3.
|
|
182
|
+
schemathesis-4.3.9.dist-info/METADATA,sha256=xqdweDGbn3i_jr_ZEgDMgh0vU8alhih5bINIKkPW0fU,8540
|
|
183
|
+
schemathesis-4.3.9.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
184
|
+
schemathesis-4.3.9.dist-info/entry_points.txt,sha256=hiK3un-xfgPdwj9uj16YVDtTNpO128bmk0U82SMv8ZQ,152
|
|
185
|
+
schemathesis-4.3.9.dist-info/licenses/LICENSE,sha256=2Ve4J8v5jMQAWrT7r1nf3bI8Vflk3rZVQefiF2zpxwg,1121
|
|
186
|
+
schemathesis-4.3.9.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|