add tests for details result formatting and trim results

Values that are None are no longer included in the output to save
a bit of bandwidth.
This commit is contained in:
Sarah Hoffmann
2023-02-04 14:17:47 +01:00
parent b742200442
commit 42c3754dcd
5 changed files with 206 additions and 23 deletions

View File

@@ -105,6 +105,9 @@ class SearchResult:
geometry: Dict[str, str] = dataclasses.field(default_factory=dict)
def __post_init__(self) -> None:
if self.indexed_date is not None and self.indexed_date.tzinfo is None:
self.indexed_date = self.indexed_date.replace(tzinfo=dt.timezone.utc)
@property
def lat(self) -> float: