schemathesis 4.0.12__py3-none-any.whl → 4.0.13__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/config/_operations.py +12 -6
- schemathesis/graphql/loaders.py +1 -0
- schemathesis/openapi/loaders.py +1 -0
- {schemathesis-4.0.12.dist-info → schemathesis-4.0.13.dist-info}/METADATA +1 -1
- {schemathesis-4.0.12.dist-info → schemathesis-4.0.13.dist-info}/RECORD +8 -8
- {schemathesis-4.0.12.dist-info → schemathesis-4.0.13.dist-info}/WHEEL +0 -0
- {schemathesis-4.0.12.dist-info → schemathesis-4.0.13.dist-info}/entry_points.txt +0 -0
- {schemathesis-4.0.12.dist-info → schemathesis-4.0.13.dist-info}/licenses/LICENSE +0 -0
@@ -159,9 +159,15 @@ class OperationsConfig(DiffBase):
|
|
159
159
|
if exclude_deprecated:
|
160
160
|
exclude_set.include(is_deprecated)
|
161
161
|
|
162
|
+
return self.filter_set_with(include=include_set, exclude=exclude_set)
|
163
|
+
|
164
|
+
def filter_set_with(self, include: FilterSet, exclude: FilterSet | None = None) -> FilterSet:
|
165
|
+
if not self.operations and exclude is None:
|
166
|
+
return include
|
162
167
|
operations = list(self.operations)
|
163
168
|
|
164
169
|
final = FilterSet()
|
170
|
+
exclude = exclude or FilterSet()
|
165
171
|
|
166
172
|
def priority_filter(ctx: HasAPIOperation) -> bool:
|
167
173
|
"""Filter operations according to CLI and config priority."""
|
@@ -169,12 +175,12 @@ class OperationsConfig(DiffBase):
|
|
169
175
|
if op_config._filter_set.match(ctx) and not op_config.enabled:
|
170
176
|
return False
|
171
177
|
|
172
|
-
if not
|
173
|
-
if
|
174
|
-
return
|
175
|
-
return
|
176
|
-
elif not
|
177
|
-
return not
|
178
|
+
if not include.is_empty():
|
179
|
+
if exclude.is_empty():
|
180
|
+
return include.match(ctx)
|
181
|
+
return include.match(ctx) and not exclude.match(ctx)
|
182
|
+
elif not exclude.is_empty():
|
183
|
+
return not exclude.match(ctx)
|
178
184
|
|
179
185
|
return True
|
180
186
|
|
schemathesis/graphql/loaders.py
CHANGED
@@ -243,6 +243,7 @@ def from_dict(schema: dict[str, Any], *, config: SchemathesisConfig | None = Non
|
|
243
243
|
config = SchemathesisConfig.discover()
|
244
244
|
project_config = config.projects.get(schema)
|
245
245
|
instance = GraphQLSchema(schema, config=project_config)
|
246
|
+
instance.filter_set = project_config.operations.filter_set_with(include=instance.filter_set)
|
246
247
|
dispatch("after_load_schema", hook_context, instance)
|
247
248
|
return instance
|
248
249
|
|
schemathesis/openapi/loaders.py
CHANGED
@@ -228,6 +228,7 @@ def from_dict(schema: dict[str, Any], *, config: SchemathesisConfig | None = Non
|
|
228
228
|
LoaderErrorKind.OPEN_API_UNSPECIFIED_VERSION,
|
229
229
|
"Unable to determine the Open API version as it's not specified in the document.",
|
230
230
|
)
|
231
|
+
instance.filter_set = project_config.operations.filter_set_with(include=instance.filter_set)
|
231
232
|
dispatch("after_load_schema", hook_context, instance)
|
232
233
|
return instance
|
233
234
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: schemathesis
|
3
|
-
Version: 4.0.
|
3
|
+
Version: 4.0.13
|
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
|
@@ -36,7 +36,7 @@ schemathesis/config/_env.py,sha256=8XfIyrnGNQuCDnfG0lwmKRFbasRUjgeQGBAMupsmtOU,6
|
|
36
36
|
schemathesis/config/_error.py,sha256=TxuuqQ1olwJc7P7ssfxXb1dB_Xn5uVsoazjvYvRxrxA,5437
|
37
37
|
schemathesis/config/_generation.py,sha256=_THqCfC20i8RRRsO2hAwoJ52FV-CS1xOA6me3Wp3FHw,5087
|
38
38
|
schemathesis/config/_health_check.py,sha256=zC9inla5ibMBlEy5WyM4_TME7ju_KH3Bwfo21RI3Gks,561
|
39
|
-
schemathesis/config/_operations.py,sha256=
|
39
|
+
schemathesis/config/_operations.py,sha256=2M36b4MMoFtaaFpe9yG-aWRqh0Qm1dpdk5M0V23X2yA,12129
|
40
40
|
schemathesis/config/_output.py,sha256=3G9SOi-4oNcQPHeNRG3HggFCwvcKOW1kF28a9m0H-pU,4434
|
41
41
|
schemathesis/config/_parameters.py,sha256=i76Hwaf834fBAMmtKfKTl1SFCicJ-Y-5tZt5QNGW2fA,618
|
42
42
|
schemathesis/config/_phases.py,sha256=NFUhn-xzEQdNtgNVW1t51lMquXbjRNGR_QuiCRLCi28,6454
|
@@ -100,10 +100,10 @@ schemathesis/generation/stateful/__init__.py,sha256=s7jiJEnguIj44IsRyMi8afs-8yjI
|
|
100
100
|
schemathesis/generation/stateful/state_machine.py,sha256=1cY3AH-f_AbUGfvfK8WMMKkUxAJT9Iw8eZGyRE2Sd44,8740
|
101
101
|
schemathesis/graphql/__init__.py,sha256=_eO6MAPHGgiADVGRntnwtPxmuvk666sAh-FAU4cG9-0,326
|
102
102
|
schemathesis/graphql/checks.py,sha256=IADbxiZjgkBWrC5yzHDtohRABX6zKXk5w_zpWNwdzYo,3186
|
103
|
-
schemathesis/graphql/loaders.py,sha256=
|
103
|
+
schemathesis/graphql/loaders.py,sha256=2tgG4HIvFmjHLr_KexVXnT8hSBM-dKG_fuXTZgE97So,9445
|
104
104
|
schemathesis/openapi/__init__.py,sha256=-KcsSAM19uOM0N5J4s-yTnQ1BFsptYhW1E51cEf6kVM,311
|
105
105
|
schemathesis/openapi/checks.py,sha256=VaQRxko6KwZL6saIzc4uUgJa_fj086O7Y6QFK8Zg-7A,12419
|
106
|
-
schemathesis/openapi/loaders.py,sha256=
|
106
|
+
schemathesis/openapi/loaders.py,sha256=_ryiESCdh_XJZsjsU4QsDeeqHY6MbBiMP4dDpiQkm-o,10742
|
107
107
|
schemathesis/openapi/generation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
108
108
|
schemathesis/openapi/generation/filters.py,sha256=pY9cUZdL_kQK80Z2aylTOqqa12zmaYUlYC5BfYgeQMk,2395
|
109
109
|
schemathesis/pytest/__init__.py,sha256=7W0q-Thcw03IAQfXE_Mo8JPZpUdHJzfu85fjK1ZdfQM,88
|
@@ -157,8 +157,8 @@ schemathesis/transport/prepare.py,sha256=erYXRaxpQokIDzaIuvt_csHcw72iHfCyNq8VNEz
|
|
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.13.dist-info/METADATA,sha256=2E4DqYcjnW29smDSYVi-vCZVU_oFIYqvRGVZgHOAniw,8472
|
161
|
+
schemathesis-4.0.13.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
162
|
+
schemathesis-4.0.13.dist-info/entry_points.txt,sha256=hiK3un-xfgPdwj9uj16YVDtTNpO128bmk0U82SMv8ZQ,152
|
163
|
+
schemathesis-4.0.13.dist-info/licenses/LICENSE,sha256=2Ve4J8v5jMQAWrT7r1nf3bI8Vflk3rZVQefiF2zpxwg,1121
|
164
|
+
schemathesis-4.0.13.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|