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 dacee38
Show file tree
Hide file tree
Showing 4 changed files with 1,680 additions and 0 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 .collections import Collections
from .conformance import ConformanceClasses
from .landing import LandingPage
from .search import Search
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 dacee38

Please sign in to comment.