Skip to content

Commit

Permalink
update changelog and add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentsarago committed Dec 19, 2023
1 parent 15996fb commit bebcd76
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).

Note: Minor version `0.X.0` update might break the API, It's recommended to pin `tipg` to minor version: `tipg>=0.1,<0.2`

## [0.5.4] - 2023-12-19

- Fix decimal error for streaming responses (author @RemcoMeeuwissen, https://github.com/developmentseed/tipg/pull/148)

## [0.5.3] - 2023-11-29

- add Postgres `date` type as valid datetime column type
Expand Down
15 changes: 15 additions & 0 deletions tests/routes/test_items.py
Original file line number Diff line number Diff line change
Expand Up @@ -865,6 +865,21 @@ def test_items_env_table_config_main(app, monkeypatch):
assert isinstance(body["features"][0]["properties"]["decimal"], str)
assert isinstance(body["features"][0]["properties"]["numeric"], str)

response = app.get(
"/collections/public.my_data/items",
params={"limit": 1},
headers={"accept": "application/geo+json-seq"},
)
assert response.status_code == 200
assert response.headers["content-type"] == "application/geo+json-seq"
body = response.text.splitlines()

assert len(body) == 1
feature = json.loads(body[0])
# Make sure that Postgres Decimal and Numeric are converted to str
assert isinstance(feature["properties"]["decimal"], str)
assert isinstance(feature["properties"]["numeric"], str)

response = app.get(
"/collections/public.my_data/items?datetime=2004-10-19T10:23:54Z"
)
Expand Down

0 comments on commit bebcd76

Please sign in to comment.