Skip to content

Commit

Permalink
Fix get_collection_list
Browse files Browse the repository at this point in the history
It was labelled as a classmethod but it's not. Includes regression test.

Closes #44.
  • Loading branch information
gadomski committed May 18, 2021
1 parent 68db8e2 commit 4ef42c6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 0 additions & 1 deletion pystac_client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@ def from_dict(

return catalog

@classmethod
def get_collections_list(self):
"""Gets list of available collections from this Catalog. Alias for get_child_links since children
of an API are always and only ever collections
Expand Down
3 changes: 3 additions & 0 deletions tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ def test_links(self):
collection_links = api.get_links('child')
assert len(collection_links) > 0

collection_links_alt = api.get_collections_list()
assert len(collection_links) == len(collection_links_alt)

first_collection = api.get_single_link('child').resolve_stac_object(root=api).target
assert isinstance(first_collection, pystac.Collection)

Expand Down

0 comments on commit 4ef42c6

Please sign in to comment.