Skip to content

Commit

Permalink
Add test for Collections list
Browse files Browse the repository at this point in the history
  • Loading branch information
moradology committed Jun 28, 2021
1 parent c6955dd commit 4a45f0a
Show file tree
Hide file tree
Showing 4 changed files with 1,692 additions and 2 deletions.
1 change: 1 addition & 0 deletions stac_pydantic/api/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from .conformance import ConformanceClasses
from .landing import LandingPage
from .search import Search
from .collections import Collections
6 changes: 6 additions & 0 deletions stac_pydantic/api/collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,9 @@ class Collections(BaseModel):

links: List[Link]
collections: List[Collection]

def to_dict(self, **kwargs):
return self.dict(by_alias=True, exclude_unset=True, **kwargs)

def to_json(self, **kwargs):
return self.json(by_alias=True, exclude_unset=True, **kwargs)
Loading

0 comments on commit 4a45f0a

Please sign in to comment.