From 757ea822be94eedc26dcb1bc12d0647ab11f1f41 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 8 Nov 2024 02:37:54 +0000 Subject: [PATCH 1/5] chore(deps): bump http-router from 4.1.2 to 5.0.8 Bumps [http-router](https://github.com/klen/http-router) from 4.1.2 to 5.0.8. - [Commits](https://github.com/klen/http-router/compare/4.1.2...5.0.8) --- updated-dependencies: - dependency-name: http-router dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- poetry.lock | 80 +++++++++++++++++++++++++------------------------- pyproject.toml | 2 +- 2 files changed, 41 insertions(+), 41 deletions(-) diff --git a/poetry.lock b/poetry.lock index 56d9319d..0419781c 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1469,51 +1469,51 @@ files = [ [[package]] name = "http-router" -version = "4.1.2" +version = "5.0.8" description = "A simple router system for HTTP applications" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "http-router-4.1.2.tar.gz", hash = "sha256:cc99cf800ccdcde68859183bab83aec54f49c6b110bf131b8cf1a7dea1cb860a"}, - {file = "http_router-4.1.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:89334f2781aeb7c8066ba4baf1187c990b684584af89caad480ba371d7d9e69c"}, - {file = "http_router-4.1.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:84dd3e43356f732771621c93c9ad7513f1be73a9d1144bfc58df7e82a83f4436"}, - {file = "http_router-4.1.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d6f2f7a023ffea56543e29694f547357a2b9b33c77b08c355fcdcf91b486d0be"}, - {file = "http_router-4.1.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:512ae57ea9b763c157ca54f9e2b159d88eca4d1075df7a18cb4a645eb05d34e7"}, - {file = "http_router-4.1.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:8286e0cb64f5c36dcb2e792f45816f811e2ce402ccb48c62b06ef9e7988674e0"}, - {file = "http_router-4.1.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:40060d329813d356784b7437d47b03c5d42718f91216a7df310325096eef8bbf"}, - {file = "http_router-4.1.2-cp310-cp310-win_amd64.whl", hash = "sha256:af00ef3edb67956724cd3daa1c6f040e73cfff5f0afe46d7eb135d086c6b57fb"}, - {file = "http_router-4.1.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:168dc4216845399a89db392d5d84d7738d4f4e9257d51e5014dbc85d9a51c4ef"}, - {file = "http_router-4.1.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:e6a4174116339915bb83ce1801cfcc929947d79fa1d2b4cb090ee3ed1c955aae"}, - {file = "http_router-4.1.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6f20377d2262e471bec8a0dfb9e4fa42a7b44434a491522bd716265fe597b352"}, - {file = "http_router-4.1.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:aa0389259608c026d49b2db74d1da6fb31b6e2c12d3631e81eb926eea935f7ea"}, - {file = "http_router-4.1.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:33b870b2f9b9a2a4691f9cc9c7ea0fe81c922a4ba5f423d6a0e91d97cf5492dc"}, - {file = "http_router-4.1.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:b4376355d41debae8b6d9670377295cf6bb84944e9916c728012a1e2079edef2"}, - {file = "http_router-4.1.2-cp311-cp311-win_amd64.whl", hash = "sha256:c8d6eede2db60ec31774e7cf5c78aa2d1bad6ac3117e0ee4a909aa684de1ad47"}, - {file = "http_router-4.1.2-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:d8a0119a36e57f2a4d511e7958b1a7e22d522d7644d3d577788366f5ba18711d"}, - {file = "http_router-4.1.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:9409d02ba3e72d6ef68dc30b9cf07ec03744856b12f9346635971b3de0e4e80b"}, - {file = "http_router-4.1.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1d4e8a3108e50d7d185513f9b2b771a39698e765bb9bcaad52ea582e0ce23406"}, - {file = "http_router-4.1.2-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:31a9492df53d7634db9106fc65f5a697a81344a8df8fa858b9e5ac862748ecc6"}, - {file = "http_router-4.1.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:b21b7717a41286d89db6ec3e5609d0636a0f22bb1de82658f316aeca3d3feeba"}, - {file = "http_router-4.1.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:392a974d225e698a43916070d936e69a98646bd1212ca1d582a4b825269c0c33"}, - {file = "http_router-4.1.2-cp312-cp312-win_amd64.whl", hash = "sha256:ffb462ba4ea9fdfbe12c5946d2e9cb1e49244d824c85fde3228c3c78ae3040a4"}, - {file = "http_router-4.1.2-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:cdf28854f05ff1b21a193cda6f5860d7983e6d68ac154410958f61bc97260a17"}, - {file = "http_router-4.1.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:28d5b09c9162e2a419788b201829b44f199fb8ad84b17b3b6e56a48373aaba9a"}, - {file = "http_router-4.1.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:67ecb93bbea33222f4a3b23c1f91d4c71cc51ff0446b9cc54b20ca260eb4ebf3"}, - {file = "http_router-4.1.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:924a9b0a9131d0e45e4007abccc88051f3041db1d37d917ab973ab3483999f2d"}, - {file = "http_router-4.1.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:58efaea2b318d14f7ff810e61511aaf3231e82f4e4dcf8ab67b532e3bfb03012"}, - {file = "http_router-4.1.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:20da643b37fecd405cae8d5e697371e6c9b9d0f0ca0edba41bf171ef14fbc411"}, - {file = "http_router-4.1.2-cp38-cp38-win_amd64.whl", hash = "sha256:b639bd95467954929ae5d1765b205aa9f68bdbc08b13b6732178302708ba0218"}, - {file = "http_router-4.1.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:6b88c0959131d139f02adc07538d342905e1984cae308f5c63e2b11fbd655a47"}, - {file = "http_router-4.1.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:0bd3c59427808596cf9ef79e11044810dc7bc36e3c78a9d788b7b2b647a3082f"}, - {file = "http_router-4.1.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d3d799f951b9c9f62c170ed89a2293827c070690efd05dba8c1010dd501afe75"}, - {file = "http_router-4.1.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b85904c993db689ee8725cd5e8bb991d0914bf32ca1ef8ee95c904897d4a8f2f"}, - {file = "http_router-4.1.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:8783324904de078841f11e991fe34633f386b4009c091e47880ea1fc2ce35fbf"}, - {file = "http_router-4.1.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:b44d897dfb7da07763eb525c02ebc34ac932944cb062c041db92f5761e5690b8"}, - {file = "http_router-4.1.2-cp39-cp39-win_amd64.whl", hash = "sha256:12ddba636fded1d0a2c8a793748717ab37659642e509017385148c0a36b25faa"}, + {file = "http_router-5.0.8-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:1e6b41b0668e695d0e755cadcc7e79b013b09e468089d1bc935b3456861b0830"}, + {file = "http_router-5.0.8-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:af57c421cff6cf3ad8bac2e4702038098bb5b38110a458fde01e8ad3155a1683"}, + {file = "http_router-5.0.8-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:23a02483bf036946789c281a42140ad1af17d374bc6c0e504c5a00890bceda5b"}, + {file = "http_router-5.0.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:06090216bf8433e7a5b12154ce147021768f7f9b02695c1bd7a2c6f2c656aa4a"}, + {file = "http_router-5.0.8-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:71e8519b69968c8b466c43fdc6b1023211d56288a38fa8efaf4c89069f4d8735"}, + {file = "http_router-5.0.8-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:235f1a09519d4cdedf23c4d59fe11a5355b0b4de934a2a4b4c4724a3db58e67c"}, + {file = "http_router-5.0.8-cp310-cp310-win_amd64.whl", hash = "sha256:6eec8b6585baf86aae95d5d801d75bd7806488aa423ccd4997884f77e0b4048f"}, + {file = "http_router-5.0.8-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:d720a8f6db5a28793dff937ef5d76a3d13c81c1bd1b5d88c773acfec43dda96f"}, + {file = "http_router-5.0.8-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:dc70a0bc5e8342153ed84ebcebcfe3404e93750e0eb04761564e439a086e7fc8"}, + {file = "http_router-5.0.8-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b8a2ffb67031675d369961a400eca2f9d2bdffc596c9ecc25c67ee12cffd9834"}, + {file = "http_router-5.0.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:017daf5d1bf7279e012f47d540058d07f7b09c48730c02c46fafb959e68ca712"}, + {file = "http_router-5.0.8-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:e991628940eee63e55d48b73fda6ce1dd810cd8e2b4706f7793f7b9a2a5ac038"}, + {file = "http_router-5.0.8-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:db33a908d7490cf2510876311755fdc1f50dbbf4dd1a1e329467bcb6c8a3bcca"}, + {file = "http_router-5.0.8-cp311-cp311-win_amd64.whl", hash = "sha256:ddf9f414ba90efc5b02b6945b8f40eb3c7cb6ec76804a01ae369c893a66a8c75"}, + {file = "http_router-5.0.8-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:42399405eaa7830c134fef064823b06d113137e8cbf29129f5a555289d857ffa"}, + {file = "http_router-5.0.8-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:c2670c039177346cb9a7e99d7d5aec304bfd76e5bab2050a869783306f089df3"}, + {file = "http_router-5.0.8-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6eb3a0e85cd82626097b70e0d9757203a641fddd3a78c442f4c1b640c03d6724"}, + {file = "http_router-5.0.8-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4a1a68ac08ea10edfd1b422704a8009812c4d8f36d155a629b231c3950040cc6"}, + {file = "http_router-5.0.8-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:914dd4513027c8b595366ce76ef262d99573a3a49bcef9ad2f31e71ac0cc377b"}, + {file = "http_router-5.0.8-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:315e1e4ad715e68c9d57629746b9416732e69bcb5afc58fd3dba6dc29fc4ab8e"}, + {file = "http_router-5.0.8-cp312-cp312-win_amd64.whl", hash = "sha256:008b6a769d9dead5d47b32df048630d0f01089256283d342978053dcbd80bb54"}, + {file = "http_router-5.0.8-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:7db15460981beaed599fb52fb2e39452dcfc6bc900f724599e92cba3faeb3c27"}, + {file = "http_router-5.0.8-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:5bf29d88d9f4c9f4c2c4f5e24975cc4d701094fb84536de5a2a80ed978c59211"}, + {file = "http_router-5.0.8-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ae7911b6c100af5b15a372ba892fb10f0e6977955a51a21b5811803b4a5e975e"}, + {file = "http_router-5.0.8-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5061e6320a8f48da0305d682599f3e48187e1374854fc015f3cf41a5afd45604"}, + {file = "http_router-5.0.8-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:f67122ede9b5432c631f302e1838fb534810f6c0859343d716de2ae19ad97810"}, + {file = "http_router-5.0.8-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:f931d95d0d88dc1563e10b5bb8bc83f93ce6609cbaeb01bf6eb83d3d2b852dec"}, + {file = "http_router-5.0.8-cp313-cp313-win_amd64.whl", hash = "sha256:96ad8f296e3c74a10d6da8422d4fb83328bc1a21934828fd39e465211aca0336"}, + {file = "http_router-5.0.8-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:5e75dbe1ecdc2edafe59ab87da545ebeeb9afc9ef5061edae83abb24dfedd5e6"}, + {file = "http_router-5.0.8-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:0c5c55f84e9a7b6c0c781ce43d801e46513cd3d830e10c77213fe1e66ed37489"}, + {file = "http_router-5.0.8-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:12cbb5f376add302c10b21fe40b3cdecf73d987c771802a007829712b0da130e"}, + {file = "http_router-5.0.8-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1fa481b0a90031778350c0eaf77e57fec707bcc45a500753e4e89d1d35898ba9"}, + {file = "http_router-5.0.8-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:cf68fceac0b9c279dc648403baede683eafd969c96aade2e7a3d695bace28981"}, + {file = "http_router-5.0.8-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:dad53e9ec644f0288376b5ca085272b9ef6f7283e09cab9597fb5d3b72666cc1"}, + {file = "http_router-5.0.8-cp39-cp39-win_amd64.whl", hash = "sha256:ba08871e2f4ce3dec587a59b04ba62d83eac2ed52b4f574bdf8b8bbd6cc670ac"}, + {file = "http_router-5.0.8.tar.gz", hash = "sha256:25c5e4511f7d9c252d24d41de43ef3cd10a72d7825787939b197291ff08130db"}, ] [package.extras] -dev = ["bump2version", "refurb", "tox"] +dev = ["bump2version", "pre-commit", "tox"] tests = ["pytest", "pytest-benchmark", "pytest-mypy", "ruff"] [[package]] @@ -4408,4 +4408,4 @@ dev = ["cookiecutter", "honcho", "watchfiles"] [metadata] lock-version = "2.0" python-versions = "^3.12" -content-hash = "90dddcbb86cb147a2d5949eb4c6f506b4bbd26590fd8d4dddf36c528a0bca420" +content-hash = "8b363ea3777abb7d093f74fc5f2e12590411e683f90e7b86475a5b2483036652" diff --git a/pyproject.toml b/pyproject.toml index 03dc9bce..a5699388 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,7 +27,7 @@ dataclasses-json = "^0.6.7" dataclasses-jsonschema = "^2.16.0" essentials-configuration = "^2.0.4" hishel = ">=0.0.30,<0.1.2" -http-router = "^4.1.2" +http-router = ">=4.1.2,<6.0.0" httpx = ">=0.26,<0.28" hypercorn = "^0.17.2" multidict = "^6.0.5" From 2c215d90e1a620a2a9f1a473a1fbe6ac66b7a582 Mon Sep 17 00:00:00 2001 From: codefactor-io Date: Fri, 8 Nov 2024 08:20:02 +0000 Subject: [PATCH 2/5] [CodeFactor] Apply fixes --- docs/_static/css/harp.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_static/css/harp.css b/docs/_static/css/harp.css index ad536c2a..2cef709d 100644 --- a/docs/_static/css/harp.css +++ b/docs/_static/css/harp.css @@ -34,7 +34,7 @@ } .sidebar-logo-container { - margin: 1em auto 0.2em auto; + margin: 1em auto 0.2em; width: 80%; } From 5d17b542a5e2de259b5aea7a013d9599abbe63a9 Mon Sep 17 00:00:00 2001 From: Arthur Degonde <44548105+ArthurD1@users.noreply.github.com> Date: Thu, 7 Nov 2024 17:46:32 +0100 Subject: [PATCH 3/5] fix: headers parsing (#577) --- .../Pages/Transactions/Components/MessageHeaders.tsx | 11 +++++++---- .../__snapshots__/TransactionDetailPage.test.tsx.snap | 8 ++++---- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/harp_apps/dashboard/frontend/src/Pages/Transactions/Components/MessageHeaders.tsx b/harp_apps/dashboard/frontend/src/Pages/Transactions/Components/MessageHeaders.tsx index 6f316ff9..ea12045d 100644 --- a/harp_apps/dashboard/frontend/src/Pages/Transactions/Components/MessageHeaders.tsx +++ b/harp_apps/dashboard/frontend/src/Pages/Transactions/Components/MessageHeaders.tsx @@ -31,17 +31,20 @@ export function MessageHeaders({ id }: MessageHeadersProps) { .split("\n") .map((line, index) => { const s = line.split(":", 2) + const headerName = s[0] + const headerValue = s[1] ? line.substring(headerName.length + 1).trim() : "" // Ensures the full value after the first colon return ( - {s[0]} + {headerName} - {s[0].toLowerCase() == "cache-control" && s[1].toLowerCase().includes("no-cache") ? ( + {headerName.toLowerCase() === "cache-control" && + headerValue.toLowerCase().includes("no-cache") ? ( - {s[1]} + {headerValue} ) : ( - s[1] + headerValue )} diff --git a/harp_apps/dashboard/frontend/src/Pages/Transactions/__snapshots__/TransactionDetailPage.test.tsx.snap b/harp_apps/dashboard/frontend/src/Pages/Transactions/__snapshots__/TransactionDetailPage.test.tsx.snap index 7091daf1..c60c5eb8 100644 --- a/harp_apps/dashboard/frontend/src/Pages/Transactions/__snapshots__/TransactionDetailPage.test.tsx.snap +++ b/harp_apps/dashboard/frontend/src/Pages/Transactions/__snapshots__/TransactionDetailPage.test.tsx.snap @@ -184,7 +184,7 @@ exports[`renders the title and data when the query is successful 1`] = ` - localhost + localhost:9001 @@ -196,7 +196,7 @@ exports[`renders the title and data when the query is successful 1`] = ` - identity + identity @@ -208,7 +208,7 @@ exports[`renders the title and data when the query is successful 1`] = ` - Foobar 3r51XEnyibdL3kRyAmts5BSfTyjjOrcbwgr3YOnwUMTcVVLzyhdzEKkQAje2XlXUva59GsJu1Z7IotiVYisO9vDjvHSyLt95SU7WEQNzhKhA7IlT2IQ11Onwmz7su9BT + Foobar 3r51XEnyibdL3kRyAmts5BSfTyjjOrcbwgr3YOnwUMTcVVLzyhdzEKkQAje2XlXUva59GsJu1Z7IotiVYisO9vDjvHSyLt95SU7WEQNzhKhA7IlT2IQ11Onwmz7su9BT @@ -314,7 +314,7 @@ exports[`renders the title and data when the query is successful 1`] = ` - application/json + application/json From bf811b1e7da42bc7da73d42dc588a0b585f87c8d Mon Sep 17 00:00:00 2001 From: Romain Dorgueil Date: Fri, 8 Nov 2024 11:00:00 +0100 Subject: [PATCH 4/5] misc: update changelog --- docs/changelogs/unreleased.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/changelogs/unreleased.rst b/docs/changelogs/unreleased.rst index 86e986aa..2d34a277 100644 --- a/docs/changelogs/unreleased.rst +++ b/docs/changelogs/unreleased.rst @@ -1,2 +1,7 @@ Unreleased ========== + +Fixed +::::: + +* UI: Correctly display header values containing a semicolon character (#577, @ArthurD1) From 1fc3c14c9b2d1a134646f1fed19c3520d7de6b24 Mon Sep 17 00:00:00 2001 From: Romain Dorgueil Date: Sat, 9 Nov 2024 17:19:46 +0100 Subject: [PATCH 5/5] fix: reduce complexity of method --- harp/utils/collections.py | 11 +- harp/utils/testing/http.py | 128 +-- .../__snapshots__/test_testing_http.ambr | 895 ++++++++++++++++++ harp/utils/tests/test_testing_http.py | 36 + 4 files changed, 1004 insertions(+), 66 deletions(-) create mode 100644 harp/utils/tests/__snapshots__/test_testing_http.ambr create mode 100644 harp/utils/tests/test_testing_http.py diff --git a/harp/utils/collections.py b/harp/utils/collections.py index a1f1a6ea..0f89aa0d 100644 --- a/harp/utils/collections.py +++ b/harp/utils/collections.py @@ -63,5 +63,12 @@ def popitem(self): raise NotImplementedError() -def all_combinations(iterable): - return set(chain(*(combinations(iterable, n + 1) for n in range(len(iterable))))) +def all_combinations(iterable, *, maxlen=None): + return set( + chain( + *( + combinations(iterable, n + 1) + for n in range(min(maxlen, len(iterable)) if maxlen and (maxlen > 0) else len(iterable)) + ) + ) + ) diff --git a/harp/utils/testing/http.py b/harp/utils/testing/http.py index b29fb0b7..174cd442 100644 --- a/harp/utils/testing/http.py +++ b/harp/utils/testing/http.py @@ -2,16 +2,28 @@ import pytest +from harp.http.utils import HTTP_METHODS from harp.typing import Maybe, NotSet def parametrize_with_http_status_codes(include=None): - statuses = list(map(lambda x: x.value, http.HTTPStatus)) + statuses = [status.value for status in http.HTTPStatus] if include is not None: - statuses = list(filter(lambda x: x // 100 in include, statuses)) + statuses = [status for status in statuses if status // 100 in include] return pytest.mark.parametrize("status_code", statuses) +def _filter_methods_by_attribute(attribute, value): + return {name for name, method in HTTP_METHODS.items() if getattr(method, attribute) is value} + + +def _update_methods_set(methods, include, attribute, value): + if include is True: + methods |= _filter_methods_by_attribute(attribute, value) + elif include is False: + methods -= _filter_methods_by_attribute(attribute, value) + + def parametrize_with_http_methods( *, include_safe=NotSet, @@ -28,75 +40,63 @@ def parametrize_with_http_methods( include_not_having_response_body=NotSet, exclude=(), ): - from harp.http.utils import HTTP_METHODS - - if { - include_safe, - include_unsafe, - include_idempotent, - include_non_idempotent, - include_standard, - include_non_standard, - include_having_request_body, - include_maybe_having_request_body, - include_not_having_request_body, - include_having_response_body, - include_maybe_having_response_body, - include_not_having_response_body, - } == {NotSet}: + """ + Parametrize a test with HTTP methods based on various inclusion and exclusion criteria. + + Parameters: + - include_safe (bool or NotSet): Include safe methods (e.g., GET, HEAD). + - include_unsafe (bool or NotSet): Include unsafe methods (e.g., POST, PUT). + - include_idempotent (bool or NotSet): Include idempotent methods (e.g., GET, PUT). + - include_non_idempotent (bool or NotSet): Include non-idempotent methods (e.g., POST). + - include_standard (bool or NotSet): Include standard HTTP methods. + - include_non_standard (bool or NotSet): Include non-standard HTTP methods. + - include_having_request_body (bool or NotSet): Include methods that have a request body. + - include_maybe_having_request_body (bool or NotSet): Include methods that may have a request body. + - include_not_having_request_body (bool or NotSet): Include methods that do not have a request body. + - include_having_response_body (bool or NotSet): Include methods that have a response body. + - include_maybe_having_response_body (bool or NotSet): Include methods that may have a response body. + - include_not_having_response_body (bool or NotSet): Include methods that do not have a response body. + - exclude (tuple): Methods to exclude from the parametrization. + + Returns: + - pytest.mark.parametrize: A pytest parametrize marker with the selected HTTP methods. + + """ + if all( + param is NotSet + for param in [ + include_safe, + include_unsafe, + include_idempotent, + include_non_idempotent, + include_standard, + include_non_standard, + include_having_request_body, + include_maybe_having_request_body, + include_not_having_request_body, + include_having_response_body, + include_maybe_having_response_body, + include_not_having_response_body, + ] + ): include_standard = True methods = set() - if include_safe is True: - methods |= {name for name, method in HTTP_METHODS.items() if method.safe is True} - if include_unsafe is True: - methods |= {name for name, method in HTTP_METHODS.items() if method.safe is False} - if include_idempotent is True: - methods |= {name for name, method in HTTP_METHODS.items() if method.idempotent is True} - if include_non_idempotent is True: - methods |= {name for name, method in HTTP_METHODS.items() if method.idempotent is False} + _update_methods_set(methods, include_safe, "safe", True) + _update_methods_set(methods, include_unsafe, "safe", False) + _update_methods_set(methods, include_idempotent, "idempotent", True) + _update_methods_set(methods, include_non_idempotent, "idempotent", False) if include_standard is True: methods |= set(HTTP_METHODS.keys()) if include_non_standard is True: methods |= {"BREW", "REMIX"} - if include_having_request_body is True: - methods |= {name for name, method in HTTP_METHODS.items() if method.request_body is True} - if include_not_having_request_body is True: - methods |= {name for name, method in HTTP_METHODS.items() if method.request_body is False} - if include_maybe_having_request_body is True: - methods |= {name for name, method in HTTP_METHODS.items() if method.request_body is Maybe} - if include_having_response_body is True: - methods |= {name for name, method in HTTP_METHODS.items() if method.response_body is True} - if include_not_having_response_body is True: - methods |= {name for name, method in HTTP_METHODS.items() if method.response_body is False} - if include_maybe_having_response_body is True: - methods |= {name for name, method in HTTP_METHODS.items() if method.response_body is Maybe} - - if include_safe is False: - methods -= {name for name, method in HTTP_METHODS.items() if method.safe is True} - if include_unsafe is False: - methods -= {name for name, method in HTTP_METHODS.items() if method.safe is False} - if include_idempotent is False: - methods -= {name for name, method in HTTP_METHODS.items() if method.idempotent is True} - if include_non_idempotent is False: - methods -= {name for name, method in HTTP_METHODS.items() if method.idempotent is False} - if include_standard is False: - methods -= set(HTTP_METHODS.keys()) - if include_non_standard is False: - methods -= {"BREW", "REMIX"} - if include_having_request_body is False: - methods -= {name for name, method in HTTP_METHODS.items() if method.request_body is True} - if include_not_having_request_body is False: - methods -= {name for name, method in HTTP_METHODS.items() if method.request_body is False} - if include_maybe_having_request_body is False: - methods -= {name for name, method in HTTP_METHODS.items() if method.request_body is Maybe} - if include_having_response_body is False: - methods -= {name for name, method in HTTP_METHODS.items() if method.response_body is True} - if include_not_having_response_body is False: - methods -= {name for name, method in HTTP_METHODS.items() if method.response_body is False} - if include_maybe_having_response_body is False: - methods -= {name for name, method in HTTP_METHODS.items() if method.response_body is Maybe} + _update_methods_set(methods, include_having_request_body, "request_body", True) + _update_methods_set(methods, include_not_having_request_body, "request_body", False) + _update_methods_set(methods, include_maybe_having_request_body, "request_body", Maybe) + _update_methods_set(methods, include_having_response_body, "response_body", True) + _update_methods_set(methods, include_not_having_response_body, "response_body", False) + _update_methods_set(methods, include_maybe_having_response_body, "response_body", Maybe) methods -= set(exclude) - return pytest.mark.parametrize("method", list(sorted(methods))) + return pytest.mark.parametrize("method", sorted(methods)) diff --git a/harp/utils/tests/__snapshots__/test_testing_http.ambr b/harp/utils/tests/__snapshots__/test_testing_http.ambr new file mode 100644 index 00000000..d99caee1 --- /dev/null +++ b/harp/utils/tests/__snapshots__/test_testing_http.ambr @@ -0,0 +1,895 @@ +# serializer version: 1 +# name: test_methods[0052544] + 'include_having_response_body,include_maybe_having_request_body,include_non_standard => BREW,GET,OPTIONS,POST,REMIX' +# --- +# name: test_methods[006d37c] + 'include_having_request_body,include_idempotent,include_standard => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[02660fd] + 'include_idempotent,include_maybe_having_request_body,include_non_standard => BREW,DELETE,GET,HEAD,OPTIONS,PUT,REMIX,TRACE' +# --- +# name: test_methods[02dcdb4] + 'include_maybe_having_request_body,include_standard => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[036d0e9] + 'include_having_response_body,include_maybe_having_response_body => DELETE,GET,OPTIONS,PATCH,POST,PUT' +# --- +# name: test_methods[04f2e48] + 'include_maybe_having_request_body,include_unsafe => CONNECT,DELETE,PATCH,POST,PUT' +# --- +# name: test_methods[058052b] + 'include_non_idempotent,include_standard => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[06d2900] + 'include_maybe_having_request_body,include_not_having_request_body,include_not_having_response_body => CONNECT,DELETE,GET,HEAD,OPTIONS,TRACE' +# --- +# name: test_methods[089c9ae] + 'include_idempotent,include_maybe_having_request_body,include_safe => DELETE,GET,HEAD,OPTIONS,PUT,TRACE' +# --- +# name: test_methods[092a30d] + 'include_having_response_body,include_maybe_having_response_body,include_not_having_request_body => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[0930a7c] + 'include_having_response_body,include_non_standard,include_safe => BREW,GET,HEAD,OPTIONS,POST,REMIX,TRACE' +# --- +# name: test_methods[0a84732] + 'include_idempotent,include_not_having_request_body => CONNECT,DELETE,GET,HEAD,OPTIONS,PUT,TRACE' +# --- +# name: test_methods[0af8567] + 'include_maybe_having_response_body,include_not_having_request_body,include_standard => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[0bdf293] + 'include_having_request_body,include_maybe_having_response_body,include_safe => DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[0c2fd5a] + 'include_not_having_request_body,include_safe => CONNECT,DELETE,GET,HEAD,OPTIONS,TRACE' +# --- +# name: test_methods[0d20cf0] + 'include_not_having_response_body,include_standard => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[0dcbb83] + 'include_non_idempotent,include_non_standard => BREW,CONNECT,PATCH,POST,REMIX' +# --- +# name: test_methods[0e5182f] + 'include_having_request_body,include_having_response_body,include_non_standard => BREW,GET,OPTIONS,PATCH,POST,PUT,REMIX' +# --- +# name: test_methods[0ed15c7] + 'include_having_request_body,include_not_having_request_body,include_safe => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[10d0948] + 'include_having_response_body,include_idempotent,include_not_having_request_body => CONNECT,DELETE,GET,HEAD,OPTIONS,POST,PUT,TRACE' +# --- +# name: test_methods[1310857] + 'include_not_having_request_body,include_safe,include_standard => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[13751f7] + 'include_idempotent,include_non_idempotent,include_unsafe => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[144feb1] + 'include_idempotent,include_non_standard,include_safe => BREW,DELETE,GET,HEAD,OPTIONS,PUT,REMIX,TRACE' +# --- +# name: test_methods[1470414] + 'include_having_request_body,include_idempotent,include_non_idempotent => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[14cdeef] + 'include_maybe_having_response_body,include_non_standard,include_not_having_response_body => BREW,CONNECT,DELETE,HEAD,PATCH,PUT,REMIX,TRACE' +# --- +# name: test_methods[1505f50] + 'include_maybe_having_response_body,include_non_idempotent,include_unsafe => CONNECT,DELETE,PATCH,POST,PUT' +# --- +# name: test_methods[1558702] + 'include_having_request_body,include_having_response_body,include_safe => GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[1638eff] + 'include_idempotent,include_maybe_having_request_body,include_not_having_response_body => CONNECT,DELETE,GET,HEAD,OPTIONS,PUT,TRACE' +# --- +# name: test_methods[166495c] + 'include_maybe_having_request_body,include_non_idempotent,include_unsafe => CONNECT,DELETE,PATCH,POST,PUT' +# --- +# name: test_methods[1801fc2] + 'include_having_request_body,include_not_having_request_body,include_not_having_response_body => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[18bec2f] + 'include_having_response_body,include_safe,include_standard => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[1a1afd7] + 'include_idempotent,include_non_idempotent => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[1b5a07b] + 'include_having_request_body,include_not_having_response_body,include_unsafe => CONNECT,DELETE,HEAD,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[1daacd5] + 'include_maybe_having_request_body,include_non_idempotent => CONNECT,PATCH,POST' +# --- +# name: test_methods[1f2c6bd] + 'include_maybe_having_response_body,include_non_standard,include_unsafe => BREW,CONNECT,DELETE,PATCH,POST,PUT,REMIX' +# --- +# name: test_methods[2094c5f] + 'include_idempotent,include_standard,include_unsafe => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[20a6a9f] + 'include_maybe_having_response_body,include_unsafe => CONNECT,DELETE,PATCH,POST,PUT' +# --- +# name: test_methods[222c7c6] + 'include_idempotent,include_standard => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[2323592] + 'include_having_response_body,include_standard => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[2373ecf] + 'include_idempotent,include_unsafe => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[246f15b] + 'include_maybe_having_request_body,include_maybe_having_response_body,include_standard => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[27a4ecf] + 'include_having_request_body,include_not_having_response_body,include_safe => CONNECT,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[2895233] + 'include_non_standard,include_not_having_response_body,include_standard => BREW,CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,REMIX,TRACE' +# --- +# name: test_methods[28d2ea5] + 'include_not_having_request_body,include_not_having_response_body => CONNECT,DELETE,GET,HEAD,OPTIONS,TRACE' +# --- +# name: test_methods[28fe53a] + 'include_non_idempotent,include_non_standard,include_safe => BREW,CONNECT,GET,HEAD,OPTIONS,PATCH,POST,REMIX,TRACE' +# --- +# name: test_methods[2a99a09] + 'include_non_standard => BREW,REMIX' +# --- +# name: test_methods[2b4608d] + 'include_maybe_having_response_body,include_not_having_response_body,include_standard => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[2c9548c] + 'include_maybe_having_request_body,include_safe,include_standard => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[2da0c3e] + 'include_maybe_having_request_body => ' +# --- +# name: test_methods[2e467a1] + 'include_maybe_having_request_body,include_maybe_having_response_body,include_safe => DELETE,GET,HEAD,OPTIONS,PATCH,PUT,TRACE' +# --- +# name: test_methods[2f2f2c2] + 'include_having_request_body,include_having_response_body,include_not_having_request_body => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[2f9a4e7] + 'include_maybe_having_request_body,include_maybe_having_response_body,include_not_having_response_body => CONNECT,DELETE,HEAD,PATCH,PUT,TRACE' +# --- +# name: test_methods[310d7b4] + 'include_having_request_body,include_not_having_response_body,include_standard => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[32210cc] + 'include_idempotent,include_not_having_response_body,include_unsafe => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[32621e2] + 'include_having_response_body,include_maybe_having_request_body => GET,OPTIONS,POST' +# --- +# name: test_methods[32e1a1c] + 'include_having_request_body,include_maybe_having_response_body,include_non_standard => BREW,DELETE,PATCH,POST,PUT,REMIX' +# --- +# name: test_methods[330bd98] + 'include_not_having_response_body,include_safe,include_standard => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[330eb50] + 'include_non_idempotent,include_not_having_request_body => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,TRACE' +# --- +# name: test_methods[330f533] + 'include_non_standard,include_not_having_request_body,include_standard => BREW,CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,REMIX,TRACE' +# --- +# name: test_methods[3403d1c] + 'include_having_response_body,include_non_idempotent,include_not_having_response_body => CONNECT,GET,HEAD,OPTIONS,PATCH,POST,TRACE' +# --- +# name: test_methods[36b6ebc] + 'include_having_response_body,include_not_having_response_body,include_unsafe => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[374a50a] + 'include_having_response_body,include_safe,include_unsafe => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[37fdfb0] + 'include_maybe_having_response_body,include_safe => DELETE,GET,HEAD,OPTIONS,PATCH,PUT,TRACE' +# --- +# name: test_methods[3934a6e] + 'include_having_request_body,include_maybe_having_response_body,include_not_having_request_body => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[39bdbd2] + 'include_non_idempotent,include_not_having_response_body,include_standard => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[39d22d0] + 'include_maybe_having_response_body,include_standard => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[3a0da8c] + 'include_having_request_body,include_non_standard,include_safe => BREW,GET,HEAD,OPTIONS,PATCH,POST,PUT,REMIX,TRACE' +# --- +# name: test_methods[3a0f45c] + 'include_idempotent,include_non_idempotent,include_safe => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[3b9aa08] + 'include_having_request_body,include_idempotent,include_maybe_having_request_body => DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[3c53798] + 'include_having_request_body,include_idempotent,include_maybe_having_response_body => DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[3d1bf55] + 'include_idempotent,include_non_standard => BREW,DELETE,GET,HEAD,OPTIONS,PUT,REMIX,TRACE' +# --- +# name: test_methods[3d275d9] + 'include_maybe_having_response_body,include_non_standard,include_standard => BREW,CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,REMIX,TRACE' +# --- +# name: test_methods[3f21ee0] + 'include_idempotent,include_maybe_having_request_body,include_unsafe => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[412d387] + 'include_maybe_having_request_body,include_non_standard,include_safe => BREW,GET,HEAD,OPTIONS,REMIX,TRACE' +# --- +# name: test_methods[41b701b] + 'include_having_request_body,include_having_response_body,include_maybe_having_response_body => DELETE,GET,OPTIONS,PATCH,POST,PUT' +# --- +# name: test_methods[4212922] + 'include_having_response_body,include_maybe_having_request_body,include_safe => GET,HEAD,OPTIONS,POST,TRACE' +# --- +# name: test_methods[4377c12] + 'include_having_response_body,include_idempotent,include_non_standard => BREW,DELETE,GET,HEAD,OPTIONS,POST,PUT,REMIX,TRACE' +# --- +# name: test_methods[4494df6] + 'include_having_request_body,include_idempotent,include_safe => DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[455a62b] + 'include_idempotent,include_maybe_having_response_body,include_standard => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[45dbbc6] + 'include_idempotent,include_maybe_having_response_body => DELETE,GET,HEAD,OPTIONS,PATCH,PUT,TRACE' +# --- +# name: test_methods[4641057] + 'include_not_having_response_body,include_safe => CONNECT,GET,HEAD,OPTIONS,TRACE' +# --- +# name: test_methods[46f15fb] + 'include_non_standard,include_safe,include_standard => BREW,CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,REMIX,TRACE' +# --- +# name: test_methods[48c728a] + 'include_having_response_body,include_non_idempotent,include_safe => CONNECT,GET,HEAD,OPTIONS,PATCH,POST,TRACE' +# --- +# name: test_methods[49b3d13] + 'include_having_request_body,include_non_idempotent,include_not_having_response_body => CONNECT,HEAD,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[4ae4076] + 'include_having_request_body,include_non_idempotent,include_not_having_request_body => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[4b54d27] + 'include_having_request_body,include_having_response_body,include_idempotent => DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[4babe01] + 'include_non_idempotent,include_non_standard,include_not_having_request_body => BREW,CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,REMIX,TRACE' +# --- +# name: test_methods[4d04791] + 'include_non_idempotent,include_unsafe => CONNECT,DELETE,PATCH,POST,PUT' +# --- +# name: test_methods[4fa2357] + 'include_not_having_request_body,include_standard => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[50276fa] + 'include_standard,include_unsafe => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[5094ed6] + 'include_maybe_having_response_body,include_non_standard,include_not_having_request_body => BREW,CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,PUT,REMIX,TRACE' +# --- +# name: test_methods[528781f] + 'include_maybe_having_response_body,include_standard,include_unsafe => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[530b220] + 'include_non_idempotent,include_non_standard,include_not_having_response_body => BREW,CONNECT,HEAD,PATCH,POST,REMIX,TRACE' +# --- +# name: test_methods[542866f] + 'include_maybe_having_response_body,include_non_idempotent,include_non_standard => BREW,CONNECT,DELETE,PATCH,POST,PUT,REMIX' +# --- +# name: test_methods[553df20] + 'include_having_response_body,include_non_idempotent => CONNECT,GET,OPTIONS,PATCH,POST' +# --- +# name: test_methods[55bd5be] + 'include_maybe_having_response_body,include_non_idempotent,include_standard => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[56aa139] + 'include_not_having_request_body,include_safe,include_unsafe => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[56bc78d] + 'include_idempotent,include_not_having_request_body,include_not_having_response_body => CONNECT,DELETE,GET,HEAD,OPTIONS,PUT,TRACE' +# --- +# name: test_methods[56d9de5] + 'include_maybe_having_request_body,include_not_having_response_body,include_standard => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[57297b6] + 'include_having_response_body,include_idempotent,include_unsafe => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[5748c92] + 'include_having_request_body,include_safe,include_unsafe => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[5783c09] + 'include_having_response_body,include_non_standard,include_unsafe => BREW,CONNECT,DELETE,GET,OPTIONS,PATCH,POST,PUT,REMIX' +# --- +# name: test_methods[583bbd7] + 'include_having_response_body => GET,OPTIONS,POST' +# --- +# name: test_methods[5936141] + 'include_having_request_body,include_maybe_having_response_body,include_non_idempotent => CONNECT,DELETE,PATCH,POST,PUT' +# --- +# name: test_methods[5c55ccf] + 'include_idempotent,include_maybe_having_request_body => DELETE,GET,HEAD,OPTIONS,PUT,TRACE' +# --- +# name: test_methods[5c8e045] + 'include_non_idempotent,include_non_standard,include_standard => BREW,CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,REMIX,TRACE' +# --- +# name: test_methods[5cdfc3d] + 'include_not_having_request_body => CONNECT,DELETE,GET,HEAD,OPTIONS,TRACE' +# --- +# name: test_methods[5d9a203] + 'include_having_response_body,include_non_idempotent,include_unsafe => CONNECT,DELETE,GET,OPTIONS,PATCH,POST,PUT' +# --- +# name: test_methods[5dddaf4] + 'include_not_having_request_body,include_not_having_response_body,include_safe => CONNECT,DELETE,GET,HEAD,OPTIONS,TRACE' +# --- +# name: test_methods[5f19fba] + 'include_maybe_having_request_body,include_safe,include_unsafe => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[5f6e523] + 'include_maybe_having_request_body,include_maybe_having_response_body,include_non_standard => BREW,DELETE,PATCH,PUT,REMIX' +# --- +# name: test_methods[621a3b9] + 'include_maybe_having_response_body,include_not_having_request_body,include_safe => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,PUT,TRACE' +# --- +# name: test_methods[62bae1f] + 'include_having_response_body,include_maybe_having_response_body,include_standard => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[6384110] + 'include_having_request_body,include_idempotent,include_not_having_request_body => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[643b57a] + 'include_idempotent,include_non_idempotent,include_not_having_response_body => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[644ccc3] + 'include_idempotent,include_non_standard,include_unsafe => BREW,CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,REMIX,TRACE' +# --- +# name: test_methods[6518f49] + 'include_non_idempotent,include_not_having_request_body,include_safe => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,TRACE' +# --- +# name: test_methods[652a0c7] + 'include_non_idempotent,include_safe => CONNECT,GET,HEAD,OPTIONS,PATCH,POST,TRACE' +# --- +# name: test_methods[653d1df] + 'include_idempotent,include_not_having_request_body,include_standard => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[6697e12] + 'include_idempotent,include_non_standard,include_not_having_response_body => BREW,CONNECT,DELETE,GET,HEAD,OPTIONS,PUT,REMIX,TRACE' +# --- +# name: test_methods[67c3735] + 'include_having_response_body,include_idempotent,include_not_having_response_body => CONNECT,DELETE,GET,HEAD,OPTIONS,POST,PUT,TRACE' +# --- +# name: test_methods[689fa4e] + 'include_having_request_body,include_non_standard,include_not_having_request_body => BREW,CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,REMIX,TRACE' +# --- +# name: test_methods[68fbb6d] + 'include_maybe_having_response_body => DELETE,PATCH,PUT' +# --- +# name: test_methods[69552dc] + 'include_having_response_body,include_maybe_having_request_body,include_not_having_response_body => CONNECT,GET,HEAD,OPTIONS,POST,TRACE' +# --- +# name: test_methods[6a0abb2] + 'include_having_response_body,include_maybe_having_request_body,include_maybe_having_response_body => DELETE,GET,OPTIONS,PATCH,POST,PUT' +# --- +# name: test_methods[6a53f95] + 'include_having_request_body,include_safe => GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[6b0ca06] + 'include_having_response_body,include_maybe_having_request_body,include_standard => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[6c63684] + 'include_having_response_body,include_safe => GET,HEAD,OPTIONS,POST,TRACE' +# --- +# name: test_methods[6c75daf] + 'include_maybe_having_response_body,include_non_standard,include_safe => BREW,DELETE,GET,HEAD,OPTIONS,PATCH,PUT,REMIX,TRACE' +# --- +# name: test_methods[6e01e2d] + 'include_non_idempotent => CONNECT,PATCH,POST' +# --- +# name: test_methods[6e6c5eb] + 'include_having_response_body,include_idempotent,include_non_idempotent => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[6e7f4f9] + 'include_having_response_body,include_non_standard,include_not_having_response_body => BREW,CONNECT,GET,HEAD,OPTIONS,POST,REMIX,TRACE' +# --- +# name: test_methods[6feab2a] + 'include_having_response_body,include_standard,include_unsafe => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[7040fb5] + 'include_having_response_body,include_not_having_request_body,include_unsafe => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[70904ff] + 'include_having_response_body,include_not_having_response_body => CONNECT,GET,HEAD,OPTIONS,POST,TRACE' +# --- +# name: test_methods[70ce85e] + 'include_having_request_body => PATCH,POST,PUT' +# --- +# name: test_methods[719520b] + 'include_having_response_body,include_not_having_request_body,include_safe => CONNECT,DELETE,GET,HEAD,OPTIONS,POST,TRACE' +# --- +# name: test_methods[72cf282] + 'include_having_request_body,include_not_having_request_body,include_standard => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[72fe4d4] + 'include_having_response_body,include_maybe_having_response_body,include_non_idempotent => CONNECT,DELETE,GET,OPTIONS,PATCH,POST,PUT' +# --- +# name: test_methods[76fa878] + 'include_maybe_having_response_body,include_not_having_request_body => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,PUT,TRACE' +# --- +# name: test_methods[79ad06a] + 'include_maybe_having_response_body,include_non_standard => BREW,DELETE,PATCH,PUT,REMIX' +# --- +# name: test_methods[7ad0a03] + 'include_having_response_body,include_not_having_request_body,include_standard => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[7ba1555] + 'include_maybe_having_response_body,include_non_idempotent,include_safe => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[7bc4b76] + 'include_having_response_body,include_maybe_having_response_body,include_non_standard => BREW,DELETE,GET,OPTIONS,PATCH,POST,PUT,REMIX' +# --- +# name: test_methods[7be3f01] + 'include_maybe_having_request_body,include_non_idempotent,include_standard => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[7cce809] + 'include_idempotent,include_maybe_having_response_body,include_non_idempotent => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[7cf4911] + 'include_having_request_body,include_maybe_having_response_body => DELETE,PATCH,POST,PUT' +# --- +# name: test_methods[7e09c44] + 'include_idempotent,include_safe => DELETE,GET,HEAD,OPTIONS,PUT,TRACE' +# --- +# name: test_methods[7e2d064] + 'include_having_response_body,include_not_having_request_body => CONNECT,DELETE,GET,HEAD,OPTIONS,POST,TRACE' +# --- +# name: test_methods[7f80f47] + 'include_having_response_body,include_idempotent => DELETE,GET,HEAD,OPTIONS,POST,PUT,TRACE' +# --- +# name: test_methods[7f97187] + 'include_having_request_body,include_unsafe => CONNECT,DELETE,PATCH,POST,PUT' +# --- +# name: test_methods[804906e] + 'include_safe,include_unsafe => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[812a893] + 'include_having_request_body,include_standard => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[81e9d09] + 'include_maybe_having_request_body,include_non_idempotent,include_not_having_response_body => CONNECT,HEAD,PATCH,POST,TRACE' +# --- +# name: test_methods[8212565] + 'include_non_idempotent,include_not_having_request_body,include_not_having_response_body => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,TRACE' +# --- +# name: test_methods[8398983] + 'include_maybe_having_request_body,include_not_having_response_body => CONNECT,HEAD,TRACE' +# --- +# name: test_methods[85387e0] + 'include_having_response_body,include_idempotent,include_standard => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[881bff4] + 'include_having_response_body,include_non_standard => BREW,GET,OPTIONS,POST,REMIX' +# --- +# name: test_methods[8985a7f] + 'include_idempotent,include_not_having_response_body => CONNECT,DELETE,GET,HEAD,OPTIONS,PUT,TRACE' +# --- +# name: test_methods[8bd3d2b] + 'include_having_response_body,include_maybe_having_request_body,include_unsafe => CONNECT,DELETE,GET,OPTIONS,PATCH,POST,PUT' +# --- +# name: test_methods[8d9527b] + 'include_non_standard,include_not_having_request_body,include_not_having_response_body => BREW,CONNECT,DELETE,GET,HEAD,OPTIONS,REMIX,TRACE' +# --- +# name: test_methods[8e2c7a5] + 'include_non_standard,include_unsafe => BREW,CONNECT,DELETE,PATCH,POST,PUT,REMIX' +# --- +# name: test_methods[8e9f140] + 'include_having_request_body,include_maybe_having_request_body,include_non_standard => BREW,PATCH,POST,PUT,REMIX' +# --- +# name: test_methods[8ea0b21] + 'include_non_standard,include_not_having_request_body,include_unsafe => BREW,CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,REMIX,TRACE' +# --- +# name: test_methods[8f3f109] + 'include_having_request_body,include_maybe_having_request_body,include_standard => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[8f4d7d3] + 'include_having_request_body,include_non_standard => BREW,PATCH,POST,PUT,REMIX' +# --- +# name: test_methods[90ef577] + 'include_having_response_body,include_maybe_having_request_body,include_not_having_request_body => CONNECT,DELETE,GET,HEAD,OPTIONS,POST,TRACE' +# --- +# name: test_methods[9154bc7] + 'include_having_response_body,include_maybe_having_response_body,include_not_having_response_body => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[92ccaaa] + 'include_idempotent,include_not_having_response_body,include_standard => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[934e567] + 'include_having_request_body,include_having_response_body,include_standard => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[93b343a] + 'include_idempotent,include_non_idempotent,include_non_standard => BREW,CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,REMIX,TRACE' +# --- +# name: test_methods[93ca027] + 'include_idempotent,include_not_having_request_body,include_unsafe => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[93f9757] + 'include_idempotent,include_maybe_having_request_body,include_non_idempotent => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[940fdba] + 'include_non_standard,include_safe,include_unsafe => BREW,CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,REMIX,TRACE' +# --- +# name: test_methods[94e878d] + 'include_non_standard,include_standard => BREW,CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,REMIX,TRACE' +# --- +# name: test_methods[96c31c9] + 'include_maybe_having_request_body,include_standard,include_unsafe => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[9718568] + 'include_maybe_having_request_body,include_maybe_having_response_body,include_not_having_request_body => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,PUT,TRACE' +# --- +# name: test_methods[9872828] + 'include_having_response_body,include_not_having_response_body,include_standard => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[98ea31b] + 'include_idempotent,include_non_idempotent,include_standard => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[99c5233] + 'include_unsafe => CONNECT,DELETE,PATCH,POST,PUT' +# --- +# name: test_methods[99ce2f8] + 'include_having_request_body,include_maybe_having_response_body,include_standard => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[9ab47c9] + 'include_maybe_having_response_body,include_non_idempotent,include_not_having_response_body => CONNECT,DELETE,HEAD,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[9b3821e] + 'include_not_having_response_body,include_unsafe => CONNECT,DELETE,HEAD,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[9c234f0] + 'include_maybe_having_request_body,include_not_having_request_body,include_standard => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[9caa5d8] + 'include_standard => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[9cf867a] + 'include_having_request_body,include_idempotent,include_not_having_response_body => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[9d0c60a] + 'include_non_idempotent,include_not_having_request_body,include_unsafe => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[9ff36df] + 'include_having_response_body,include_maybe_having_request_body,include_non_idempotent => CONNECT,GET,OPTIONS,PATCH,POST' +# --- +# name: test_methods[a096cde] + 'include_maybe_having_request_body,include_non_standard,include_not_having_response_body => BREW,CONNECT,HEAD,REMIX,TRACE' +# --- +# name: test_methods[a10fe4a] + 'include_maybe_having_response_body,include_non_idempotent => CONNECT,DELETE,PATCH,POST,PUT' +# --- +# name: test_methods[a130790] + 'include_non_standard,include_not_having_response_body,include_unsafe => BREW,CONNECT,DELETE,HEAD,PATCH,POST,PUT,REMIX,TRACE' +# --- +# name: test_methods[a1bcb86] + 'include_maybe_having_request_body,include_non_idempotent,include_not_having_request_body => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,TRACE' +# --- +# name: test_methods[a1c8a06] + 'include_maybe_having_request_body,include_non_idempotent,include_non_standard => BREW,CONNECT,PATCH,POST,REMIX' +# --- +# name: test_methods[a21b280] + 'include_idempotent,include_maybe_having_response_body,include_safe => DELETE,GET,HEAD,OPTIONS,PATCH,PUT,TRACE' +# --- +# name: test_methods[a336235] + 'include_idempotent,include_maybe_having_request_body,include_standard => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[a61585f] + 'include_idempotent,include_non_standard,include_standard => BREW,CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,REMIX,TRACE' +# --- +# name: test_methods[a9bbb5b] + 'include_having_response_body,include_non_idempotent,include_standard => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[ab4bc75] + 'include_having_response_body,include_not_having_response_body,include_safe => CONNECT,GET,HEAD,OPTIONS,POST,TRACE' +# --- +# name: test_methods[ab5ab1e] + 'include_having_request_body,include_non_idempotent,include_standard => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[aba23cc] + 'include_maybe_having_request_body,include_maybe_having_response_body => DELETE,PATCH,PUT' +# --- +# name: test_methods[acab7dc] + 'include_safe,include_standard => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[ad6155c] + 'include_idempotent,include_non_standard,include_not_having_request_body => BREW,CONNECT,DELETE,GET,HEAD,OPTIONS,PUT,REMIX,TRACE' +# --- +# name: test_methods[ad679b1] + 'include_having_request_body,include_non_idempotent,include_unsafe => CONNECT,DELETE,PATCH,POST,PUT' +# --- +# name: test_methods[ad727d0] + 'include_maybe_having_request_body,include_non_standard,include_standard => BREW,CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,REMIX,TRACE' +# --- +# name: test_methods[ad82855] + 'include_idempotent,include_not_having_request_body,include_safe => CONNECT,DELETE,GET,HEAD,OPTIONS,PUT,TRACE' +# --- +# name: test_methods[ae81a8a] + 'include_having_request_body,include_maybe_having_request_body,include_not_having_response_body => CONNECT,HEAD,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[aeb1c3d] + 'include_having_request_body,include_having_response_body,include_not_having_response_body => CONNECT,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[b22740b] + 'include_maybe_having_response_body,include_non_idempotent,include_not_having_request_body => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[b31bdd3] + 'include_non_idempotent,include_non_standard,include_unsafe => BREW,CONNECT,DELETE,PATCH,POST,PUT,REMIX' +# --- +# name: test_methods[b325722] + 'include_idempotent,include_maybe_having_request_body,include_maybe_having_response_body => DELETE,GET,HEAD,OPTIONS,PATCH,PUT,TRACE' +# --- +# name: test_methods[b4900a0] + 'include_having_request_body,include_maybe_having_request_body,include_non_idempotent => CONNECT,PATCH,POST,PUT' +# --- +# name: test_methods[b716df0] + 'include_maybe_having_response_body,include_not_having_response_body,include_safe => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,PUT,TRACE' +# --- +# name: test_methods[b791583] + 'include_not_having_response_body => CONNECT,HEAD,TRACE' +# --- +# name: test_methods[b7b1639] + 'include_idempotent,include_non_idempotent,include_not_having_request_body => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[b7b8d20] + 'include_having_request_body,include_maybe_having_request_body,include_unsafe => CONNECT,DELETE,PATCH,POST,PUT' +# --- +# name: test_methods[b7eb975] + 'include_having_request_body,include_non_idempotent => CONNECT,PATCH,POST,PUT' +# --- +# name: test_methods[b891a21] + 'include_non_idempotent,include_safe,include_unsafe => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[b96cb50] + 'include_having_response_body,include_non_standard,include_standard => BREW,CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,REMIX,TRACE' +# --- +# name: test_methods[b9ee284] + 'include_having_response_body,include_idempotent,include_maybe_having_request_body => DELETE,GET,HEAD,OPTIONS,POST,PUT,TRACE' +# --- +# name: test_methods[b9f231c] + 'include_having_request_body,include_maybe_having_request_body,include_safe => GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[bab2ab3] + 'include_maybe_having_request_body,include_not_having_request_body,include_safe => CONNECT,DELETE,GET,HEAD,OPTIONS,TRACE' +# --- +# name: test_methods[bb0b2fe] + 'include_having_response_body,include_unsafe => CONNECT,DELETE,GET,OPTIONS,PATCH,POST,PUT' +# --- +# name: test_methods[bb56a68] + 'include_non_standard,include_not_having_response_body,include_safe => BREW,CONNECT,GET,HEAD,OPTIONS,REMIX,TRACE' +# --- +# name: test_methods[bba3e2e] + 'include_idempotent,include_safe,include_standard => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[bd10651] + 'include_having_request_body,include_maybe_having_request_body,include_not_having_request_body => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[bd2a3e5] + 'include_not_having_request_body,include_not_having_response_body,include_unsafe => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[bd5670e] + 'include_maybe_having_response_body,include_safe,include_unsafe => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[bdefc84] + 'include_maybe_having_request_body,include_not_having_response_body,include_safe => CONNECT,GET,HEAD,OPTIONS,TRACE' +# --- +# name: test_methods[be625ad] + 'include_idempotent,include_maybe_having_response_body,include_not_having_request_body => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,PUT,TRACE' +# --- +# name: test_methods[be77ed5] + 'include_non_idempotent,include_safe,include_standard => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[bf4ac8b] + 'include_idempotent => DELETE,GET,HEAD,OPTIONS,PUT,TRACE' +# --- +# name: test_methods[bfab079] + 'include_having_response_body,include_maybe_having_response_body,include_safe => DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[c02dd9f] + 'include_non_idempotent,include_standard,include_unsafe => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[c12d67f] + 'include_idempotent,include_maybe_having_request_body,include_not_having_request_body => CONNECT,DELETE,GET,HEAD,OPTIONS,PUT,TRACE' +# --- +# name: test_methods[c311656] + 'include_non_idempotent,include_not_having_response_body,include_unsafe => CONNECT,DELETE,HEAD,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[c3e5758] + 'include_having_request_body,include_non_standard,include_standard => BREW,CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,REMIX,TRACE' +# --- +# name: test_methods[c511b67] + 'include_having_request_body,include_maybe_having_response_body,include_unsafe => CONNECT,DELETE,PATCH,POST,PUT' +# --- +# name: test_methods[c5655d5] + 'include_not_having_response_body,include_standard,include_unsafe => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[c5e4bcc] + 'include_having_request_body,include_having_response_body,include_non_idempotent => CONNECT,GET,OPTIONS,PATCH,POST,PUT' +# --- +# name: test_methods[c8dc22c] + 'include_maybe_having_response_body,include_safe,include_standard => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[c9cf668] + 'include_having_response_body,include_maybe_having_response_body,include_unsafe => CONNECT,DELETE,GET,OPTIONS,PATCH,POST,PUT' +# --- +# name: test_methods[cb4bd7d] + 'include_non_standard,include_not_having_response_body => BREW,CONNECT,HEAD,REMIX,TRACE' +# --- +# name: test_methods[cb4c255] + 'include_having_request_body,include_having_response_body => GET,OPTIONS,PATCH,POST,PUT' +# --- +# name: test_methods[cc51a51] + 'include_having_request_body,include_maybe_having_request_body,include_maybe_having_response_body => DELETE,PATCH,POST,PUT' +# --- +# name: test_methods[cc78d02] + 'include_idempotent,include_maybe_having_response_body,include_non_standard => BREW,DELETE,GET,HEAD,OPTIONS,PATCH,PUT,REMIX,TRACE' +# --- +# name: test_methods[cd5574e] + 'include_maybe_having_request_body,include_not_having_request_body,include_unsafe => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[cde96cb] + 'include_non_idempotent,include_not_having_response_body,include_safe => CONNECT,GET,HEAD,OPTIONS,PATCH,POST,TRACE' +# --- +# name: test_methods[cfce5ad] + 'include_maybe_having_request_body,include_safe => GET,HEAD,OPTIONS,TRACE' +# --- +# name: test_methods[d143b76] + 'include_idempotent,include_safe,include_unsafe => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[d4b40ff] + 'include_not_having_request_body,include_standard,include_unsafe => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[d511f0e] + 'include_safe => GET,HEAD,OPTIONS,TRACE' +# --- +# name: test_methods[d576c96] + 'include_idempotent,include_maybe_having_response_body,include_unsafe => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[d5d8022] + 'include_maybe_having_response_body,include_not_having_request_body,include_not_having_response_body => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,PUT,TRACE' +# --- +# name: test_methods[d976e41] + 'include_having_request_body,include_not_having_request_body => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[da4d62d] + 'include_having_response_body,include_not_having_request_body,include_not_having_response_body => CONNECT,DELETE,GET,HEAD,OPTIONS,POST,TRACE' +# --- +# name: test_methods[da57300] + 'include_maybe_having_request_body,include_non_standard,include_unsafe => BREW,CONNECT,DELETE,PATCH,POST,PUT,REMIX' +# --- +# name: test_methods[db5156d] + 'include_having_request_body,include_non_standard,include_not_having_response_body => BREW,CONNECT,HEAD,PATCH,POST,PUT,REMIX,TRACE' +# --- +# name: test_methods[db5f748] + 'include_having_request_body,include_safe,include_standard => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[dc8e191] + 'include_non_standard,include_not_having_request_body => BREW,CONNECT,DELETE,GET,HEAD,OPTIONS,REMIX,TRACE' +# --- +# name: test_methods[dde4f76] + 'include_having_response_body,include_non_idempotent,include_non_standard => BREW,CONNECT,GET,OPTIONS,PATCH,POST,REMIX' +# --- +# name: test_methods[dea7260] + 'include_safe,include_standard,include_unsafe => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[df68731] + 'include_non_idempotent,include_not_having_response_body => CONNECT,HEAD,PATCH,POST,TRACE' +# --- +# name: test_methods[dfa8b94] + 'include_having_request_body,include_maybe_having_response_body,include_not_having_response_body => CONNECT,DELETE,HEAD,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[e08abd1] + 'include_maybe_having_request_body,include_maybe_having_response_body,include_unsafe => CONNECT,DELETE,PATCH,POST,PUT' +# --- +# name: test_methods[e217019] + 'include_having_response_body,include_idempotent,include_safe => DELETE,GET,HEAD,OPTIONS,POST,PUT,TRACE' +# --- +# name: test_methods[e2ca20e] + 'include_having_request_body,include_non_idempotent,include_safe => CONNECT,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[e4f46a0] + 'include_having_request_body,include_idempotent,include_non_standard => BREW,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,REMIX,TRACE' +# --- +# name: test_methods[e51fed8] + 'include_idempotent,include_not_having_response_body,include_safe => CONNECT,DELETE,GET,HEAD,OPTIONS,PUT,TRACE' +# --- +# name: test_methods[e5333ec] + 'include_having_request_body,include_having_response_body,include_maybe_having_request_body => GET,OPTIONS,PATCH,POST,PUT' +# --- +# name: test_methods[e58b99e] + 'include_having_request_body,include_non_standard,include_unsafe => BREW,CONNECT,DELETE,PATCH,POST,PUT,REMIX' +# --- +# name: test_methods[e5a49c5] + 'include_idempotent,include_maybe_having_response_body,include_not_having_response_body => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,PUT,TRACE' +# --- +# name: test_methods[e5e812f] + 'include_having_request_body,include_idempotent => DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[e5f13d4] + 'include_having_response_body,include_idempotent,include_maybe_having_response_body => DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[e5f6902] + 'include_maybe_having_response_body,include_not_having_response_body,include_unsafe => CONNECT,DELETE,HEAD,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[e6b03b2] + 'include_maybe_having_response_body,include_not_having_request_body,include_unsafe => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[e7b90cb] + 'include_non_idempotent,include_not_having_request_body,include_standard => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[e8b46c4] + 'include_not_having_request_body,include_not_having_response_body,include_standard => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[e927028] + 'include_having_response_body,include_non_standard,include_not_having_request_body => BREW,CONNECT,DELETE,GET,HEAD,OPTIONS,POST,REMIX,TRACE' +# --- +# name: test_methods[ea35f5e] + 'include_non_standard,include_standard,include_unsafe => BREW,CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,REMIX,TRACE' +# --- +# name: test_methods[ea9d5bd] + 'include_non_standard,include_safe => BREW,GET,HEAD,OPTIONS,REMIX,TRACE' +# --- +# name: test_methods[eccea02] + 'include_not_having_response_body,include_safe,include_unsafe => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[ed34c54] + 'include_not_having_request_body,include_unsafe => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[ee8be70] + 'include_maybe_having_request_body,include_non_standard,include_not_having_request_body => BREW,CONNECT,DELETE,GET,HEAD,OPTIONS,REMIX,TRACE' +# --- +# name: test_methods[f061085] + 'include_maybe_having_request_body,include_maybe_having_response_body,include_non_idempotent => CONNECT,DELETE,PATCH,POST,PUT' +# --- +# name: test_methods[f0aa2bb] + 'include_having_request_body,include_non_idempotent,include_non_standard => BREW,CONNECT,PATCH,POST,PUT,REMIX' +# --- +# name: test_methods[f367704] + 'include_having_request_body,include_not_having_request_body,include_unsafe => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[f42e0f7] + 'include_having_request_body,include_standard,include_unsafe => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[f50811d] + 'include_having_response_body,include_non_idempotent,include_not_having_request_body => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,TRACE' +# --- +# name: test_methods[f563c77] + 'include_having_request_body,include_having_response_body,include_unsafe => CONNECT,DELETE,GET,OPTIONS,PATCH,POST,PUT' +# --- +# name: test_methods[f7c7fdc] + 'include_maybe_having_request_body,include_not_having_response_body,include_unsafe => CONNECT,DELETE,HEAD,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[f7dc3b6] + 'include_non_standard,include_not_having_request_body,include_safe => BREW,CONNECT,DELETE,GET,HEAD,OPTIONS,REMIX,TRACE' +# --- +# name: test_methods[f81e8f4] + 'include_maybe_having_request_body,include_non_idempotent,include_safe => CONNECT,GET,HEAD,OPTIONS,PATCH,POST,TRACE' +# --- +# name: test_methods[fa54134] + 'include_maybe_having_response_body,include_not_having_response_body => CONNECT,DELETE,HEAD,PATCH,PUT,TRACE' +# --- +# name: test_methods[fbfc624] + 'include_maybe_having_request_body,include_non_standard => BREW,REMIX' +# --- +# name: test_methods[fc9cbc5] + 'include_having_request_body,include_not_having_response_body => CONNECT,HEAD,PATCH,POST,PUT,TRACE' +# --- +# name: test_methods[fd11929] + 'include_maybe_having_request_body,include_not_having_request_body => CONNECT,DELETE,GET,HEAD,OPTIONS,TRACE' +# --- +# name: test_methods[fe0b359] + 'include_having_request_body,include_maybe_having_request_body => PATCH,POST,PUT' +# --- +# name: test_methods[fedb1aa] + 'include_having_request_body,include_idempotent,include_unsafe => CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE' +# --- diff --git a/harp/utils/tests/test_testing_http.py b/harp/utils/tests/test_testing_http.py new file mode 100644 index 00000000..e646dbfe --- /dev/null +++ b/harp/utils/tests/test_testing_http.py @@ -0,0 +1,36 @@ +import hashlib + +import pytest + +from harp.utils.collections import all_combinations +from harp.utils.testing.http import parametrize_with_http_methods + + +@pytest.mark.parametrize( + "parameters", + list( + sorted( + all_combinations( + [ + "include_safe", + "include_unsafe", + "include_idempotent", + "include_non_idempotent", + "include_standard", + "include_non_standard", + "include_having_request_body", + "include_maybe_having_request_body", + "include_not_having_request_body", + "include_having_response_body", + "include_maybe_having_response_body", + "include_not_having_response_body", + ], + maxlen=3, + ), + ) + ), + ids=lambda x: hashlib.md5(",".join(sorted(x)).encode()).hexdigest()[:7], +) +def test_methods(snapshot, parameters): + p = parametrize_with_http_methods(**{k: True for k in parameters}) + assert snapshot == ",".join(sorted(parameters)) + " => " + ",".join(sorted(p.args[1]))