Skip to content

Commit 2a15bc5

Browse files
authored
Update tests/catalog/test_rest.py
1 parent dbe6d01 commit 2a15bc5

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

tests/catalog/test_rest.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2355,9 +2355,8 @@ def test_table_uuid_check_on_refresh(rest_mock: Mocker, example_table_metadata_v
23552355
assert f"refreshed={different_uuid}" in str(exc_info.value)
23562356

23572357

2358-
@pytest.mark.parametrize(
2359-
"raw_string, http_method, path",
2360-
[
2358+
def test_endpoint_parsing_from_string_with_valid_http_method() -> None:
2359+
test_cases = [
23612360
("GET /v1/resource", HttpMethod.GET, "/v1/resource"),
23622361
("HEAD /v1/resource", HttpMethod.HEAD, "/v1/resource"),
23632362
("POST /v1/resource", HttpMethod.POST, "/v1/resource"),
@@ -2367,12 +2366,12 @@ def test_table_uuid_check_on_refresh(rest_mock: Mocker, example_table_metadata_v
23672366
("OPTIONS /v1/resource", HttpMethod.OPTIONS, "/v1/resource"),
23682367
("TRACE /v1/resource", HttpMethod.TRACE, "/v1/resource"),
23692368
("PATCH /v1/resource", HttpMethod.PATCH, "/v1/resource"),
2370-
],
2371-
)
2372-
def test_endpoint_parsing_from_string_with_valid_http_method(raw_string: str, http_method: HttpMethod, path: str) -> None:
2373-
endpoint = Endpoint.from_string(raw_string)
2374-
assert endpoint.http_method == http_method
2375-
assert endpoint.path == path
2369+
]
2370+
2371+
for raw_string, http_method, path in test_cases:
2372+
endpoint = Endpoint.from_string(raw_string)
2373+
assert endpoint.http_method == http_method
2374+
assert endpoint.path == path
23762375

23772376

23782377
def test_endpoint_parsing_from_string_with_invalid_http_method() -> None:

0 commit comments

Comments
 (0)