Skip to content

Commit edd86a3

Browse files
committed
test(integration): scope execute_saved_query to a database id
1 parent a02a905 commit edd86a3

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

tests/integration/test_saved_query_versioning.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414

1515
def test_saved_query_versioning(
16-
saved_queries_api: SavedQueriesApi, sdkci_name
16+
saved_queries_api: SavedQueriesApi, sdkci_name, database_id: str
1717
) -> None:
1818
name = sdkci_name("savedq-versioning")
1919
created_id: str | None = None
@@ -50,7 +50,12 @@ def test_saved_query_versioning(
5050
f"expected versions 1,2,3 in {sorted(version_numbers)}"
5151
)
5252

53-
executed = saved_queries_api.execute_saved_query(created.id)
53+
# execute_saved_query runs SQL, so it also needs the database scope.
54+
# The endpoint has no typed x_database_id param yet, so set the header
55+
# directly via the _headers override.
56+
executed = saved_queries_api.execute_saved_query(
57+
created.id, _headers={"X-Database-Id": database_id}
58+
)
5459
assert executed.row_count == 1
5560
assert executed.rows == [[3]]
5661
finally:

0 commit comments

Comments
 (0)