schemathesis 3.39.0__py3-none-any.whl → 3.39.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.
schemathesis/_xml.py CHANGED
@@ -92,7 +92,7 @@ def _write_object(
92
92
  _write_namespace(buffer, options)
93
93
 
94
94
  attribute_namespaces = {}
95
- attributes = []
95
+ attributes = {}
96
96
  children_buffer = StringIO()
97
97
  properties = (schema or {}).get("properties", {})
98
98
  for child_name, value in obj.items():
@@ -110,7 +110,9 @@ def _write_object(
110
110
  attribute_namespaces[prefix] = child_options["namespace"]
111
111
  else:
112
112
  attr_name = _sanitize_xml_name(child_tag)
113
- attributes.append(f'{attr_name}="{_escape_xml(value)}"')
113
+
114
+ if attr_name not in attributes: # Only keep first occurrence
115
+ attributes[attr_name] = f'{attr_name}="{_escape_xml(value)}"'
114
116
  continue
115
117
 
116
118
  child_tag = _sanitize_xml_name(child_tag)
@@ -126,7 +128,7 @@ def _write_object(
126
128
  buffer.write(f' xmlns:{prefix}="{namespace}"')
127
129
 
128
130
  if attributes:
129
- buffer.write(f" {' '.join(attributes)}")
131
+ buffer.write(f" {' '.join(attributes.values())}")
130
132
  buffer.write(">")
131
133
  buffer.write(children_buffer.getvalue())
132
134
  buffer.write(f"</{tag}>")
@@ -366,6 +366,10 @@ def ensure_resource_availability(ctx: CheckContext, response: GenericResponse, o
366
366
  and original.source.case.operation.method.upper() == "POST"
367
367
  and 200 <= original.source.response.status_code < 400
368
368
  and original.source.overrides_all_parameters
369
+ and _is_prefix_operation(
370
+ ResourcePath(original.source.case.path, original.source.case.path_parameters or {}),
371
+ ResourcePath(original.path, original.path_parameters or {}),
372
+ )
369
373
  ):
370
374
  created_with = original.source.case.operation.verbose_name
371
375
  not_available_with = original.operation.verbose_name
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: schemathesis
3
- Version: 3.39.0
3
+ Version: 3.39.1
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
@@ -6,7 +6,7 @@ schemathesis/_lazy_import.py,sha256=aMhWYgbU2JOltyWBb32vnWBb6kykOghucEzI_F70yVE,
6
6
  schemathesis/_override.py,sha256=TAjYB3eJQmlw9K_xiR9ptt9Wj7if4U7UFlUhGjpBAoM,1625
7
7
  schemathesis/_patches.py,sha256=Hsbpn4UVeXUQD2Kllrbq01CSWsTYENWa0VJTyhX5C2k,895
8
8
  schemathesis/_rate_limiter.py,sha256=q_XWst5hzuAyXQRiZc4s_bx7-JlPYZM_yKDmeavt3oo,242
9
- schemathesis/_xml.py,sha256=_R8h8dn2VepX8EywGnQZOjLw8qg5uIjHEHll4G_BkN8,8467
9
+ schemathesis/_xml.py,sha256=qc2LydEwIqcSfgqQOJqiYicivA4YFJGKgCBOem_JqNc,8560
10
10
  schemathesis/auths.py,sha256=De97IS_iOlC36-jRhkZ2DUndjUpXYgsd8R-nA-iHn88,16837
11
11
  schemathesis/checks.py,sha256=YPUI1N5giGBy1072vd77e6HWelGAKrJUmJLEG4oqfF8,2630
12
12
  schemathesis/code_samples.py,sha256=rsdTo6ksyUs3ZMhqx0mmmkPSKUCFa--snIOYsXgZd80,4120
@@ -107,7 +107,7 @@ schemathesis/specs/graphql/validation.py,sha256=uINIOt-2E7ZuQV2CxKzwez-7L9tDtqzM
107
107
  schemathesis/specs/openapi/__init__.py,sha256=HDcx3bqpa6qWPpyMrxAbM3uTo0Lqpg-BUNZhDJSJKnw,279
108
108
  schemathesis/specs/openapi/_cache.py,sha256=PAiAu4X_a2PQgD2lG5H3iisXdyg4SaHpU46bRZvfNkM,4320
109
109
  schemathesis/specs/openapi/_hypothesis.py,sha256=nU8UDn1PzGCre4IVmwIuO9-CZv1KJe1fYY0d2BojhSo,22981
110
- schemathesis/specs/openapi/checks.py,sha256=VqrgvUbD8dUULxozjcuHZqP6sLrhEeP47Rz2EAQz84Q,25104
110
+ schemathesis/specs/openapi/checks.py,sha256=6FMWic9JHF1DsIieYjx5qIdeKeddsw-Jlb7HuK-Ifdw,25318
111
111
  schemathesis/specs/openapi/constants.py,sha256=JqM_FHOenqS_MuUE9sxVQ8Hnw0DNM8cnKDwCwPLhID4,783
112
112
  schemathesis/specs/openapi/converter.py,sha256=Yxw9lS_JKEyi-oJuACT07fm04bqQDlAu-iHwzkeDvE4,3546
113
113
  schemathesis/specs/openapi/definitions.py,sha256=WTkWwCgTc3OMxfKsqh6YDoGfZMTThSYrHGp8h0vLAK0,93935
@@ -153,8 +153,8 @@ schemathesis/transports/auth.py,sha256=urSTO9zgFO1qU69xvnKHPFQV0SlJL3d7_Ojl0tLnZ
153
153
  schemathesis/transports/content_types.py,sha256=MiKOm-Hy5i75hrROPdpiBZPOTDzOwlCdnthJD12AJzI,2187
154
154
  schemathesis/transports/headers.py,sha256=hr_AIDOfUxsJxpHfemIZ_uNG3_vzS_ZeMEKmZjbYiBE,990
155
155
  schemathesis/transports/responses.py,sha256=OFD4ZLqwEFpo7F9vaP_SVgjhxAqatxIj38FS4XVq8Qs,1680
156
- schemathesis-3.39.0.dist-info/METADATA,sha256=ZFA8TF6uMkvkRtwPmSkjI0UrgLVOsuZHLqdikcGw6gk,12956
157
- schemathesis-3.39.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
158
- schemathesis-3.39.0.dist-info/entry_points.txt,sha256=VHyLcOG7co0nOeuk8WjgpRETk5P1E2iCLrn26Zkn5uk,158
159
- schemathesis-3.39.0.dist-info/licenses/LICENSE,sha256=PsPYgrDhZ7g9uwihJXNG-XVb55wj2uYhkl2DD8oAzY0,1103
160
- schemathesis-3.39.0.dist-info/RECORD,,
156
+ schemathesis-3.39.1.dist-info/METADATA,sha256=nlt5mHbH7Af2CKtH8Ah7flGWMEA5faS72Mo1QVK1v3Y,12956
157
+ schemathesis-3.39.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
158
+ schemathesis-3.39.1.dist-info/entry_points.txt,sha256=VHyLcOG7co0nOeuk8WjgpRETk5P1E2iCLrn26Zkn5uk,158
159
+ schemathesis-3.39.1.dist-info/licenses/LICENSE,sha256=PsPYgrDhZ7g9uwihJXNG-XVb55wj2uYhkl2DD8oAzY0,1103
160
+ schemathesis-3.39.1.dist-info/RECORD,,