Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-maschler committed Jun 3, 2024
1 parent 348e983 commit 28032db
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions pystac_client/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,11 @@ def _get_queryables_href(self) -> str:
href = self._get_href(QUERYABLES_REL, link, QUERYABLES_ENDPOINT)
return href

def set_queryables(self, queryables: Dict[str, Any], url: Option[str]) -> None:
def set_queryables(
self, queryables: Dict[str, Any], url: Optional[str] = None
) -> None:
"""Write a queryables to an endpoint.
Defaults to the queryables href as defined by the STAC API extension.
"""
if self._stac_io is None:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -771,5 +771,5 @@ def test_set_queryables(tmp_path: Path) -> None:

# write content to a temp file
tmp_file = tmp_path / "queryables.json"
client.write_queryables_to(queryables, str(tmp_file))
client.set_queryables(queryables, str(tmp_file))
assert json.loads(tmp_file.read_text()) == queryables

0 comments on commit 28032db

Please sign in to comment.