Skip to content

Commit 65fa260

Browse files
committed
Tests: Assert no query params when page size is unset
Pin the unchanged request shape for list_tables, list_views and list_namespaces without rest-page-size, since requests-mock matches extra query params by default.
1 parent a0cb2b7 commit 65fa260

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎tests/catalog/test_rest.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,7 @@ def test_list_tables_200(rest_mock: Mocker) -> None:
479479
)
480480

481481
assert RestCatalog("rest", uri=TEST_URI, token=TEST_TOKEN).list_tables(namespace) == [("examples", "fooshare")]
482+
assert rest_mock.last_request.qs == {}
482483

483484

484485
def test_list_tables_paginated_200(rest_mock: Mocker) -> None:
@@ -805,6 +806,7 @@ def test_list_views_200(rest_mock: Mocker) -> None:
805806
)
806807

807808
assert RestCatalog("rest", uri=TEST_URI, token=TEST_TOKEN).list_views(namespace) == [("examples", "fooshare")]
809+
assert rest_mock.last_request.qs == {}
808810

809811

810812
def test_list_views_paginated_200(rest_mock: Mocker) -> None:
@@ -1016,6 +1018,7 @@ def test_list_namespaces_200(rest_mock: Mocker) -> None:
10161018
("fokko",),
10171019
("system",),
10181020
]
1021+
assert rest_mock.last_request.qs == {}
10191022

10201023

10211024
def test_list_namespace_with_parent_200(rest_mock: Mocker) -> None:

0 commit comments

Comments
 (0)