pre-commit-ci-lite[bot]
4 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
10 additions and
1 deletions
-
tests/test_generate_unique_id_function.py
|
|
|
@ -1711,7 +1711,16 @@ def test_multiple_methods_unique_operation_id(): |
|
|
|
with warnings.catch_warnings(record=True) as w: |
|
|
|
warnings.simplefilter("always") |
|
|
|
response = client.get("/openapi.json") |
|
|
|
assert len([x for x in w if "Duplicate Operation ID" in str(getattr(x, "message", ""))]) == 0 |
|
|
|
assert ( |
|
|
|
len( |
|
|
|
[ |
|
|
|
x |
|
|
|
for x in w |
|
|
|
if "Duplicate Operation ID" in str(getattr(x, "message", "")) |
|
|
|
] |
|
|
|
) |
|
|
|
== 0 |
|
|
|
) |
|
|
|
paths = response.json()["paths"]["/clear"] |
|
|
|
post_id = paths["post"]["operationId"] |
|
|
|
delete_id = paths["delete"]["operationId"] |
|
|
|
|