Skip to content

Commit

Permalink
Add test, update changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
jsignell committed May 4, 2023
1 parent 88a2a96 commit 0ed2c02
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
- Expand support for previous extension schema URIs ([#1091](https://github.com/stac-utils/pystac/pull/1091))
- Use `pyproject.toml` instead of `setup.py` ([#1100](https://github.com/stac-utils/pystac/pull/1100))
- `DefaultStacIO` now raises an error if it tries to write to a non-local url ([#1107](https://github.com/stac-utils/pystac/pull/1107))
- Allow instantiation of pystac objects even with `"stac_extensions": null` ([#1109](https://github.com/stac-utils/pystac/pull/1109))

### Deprecated

Expand Down
10 changes: 10 additions & 0 deletions tests/serialization/test_migrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,13 @@ def test_should_raise_exception_when_passing_invalid_extension_object(
match=r"^Item Assets extension does not apply to type 'object'$",
):
ItemAssetsExtension.ext(object()) # type: ignore


def test_migrate_works_even_if_stac_extensions_is_null(
test_case_1_catalog: pystac.Catalog,
) -> None:
collection = list(test_case_1_catalog.get_all_collections())[0]
collection_dict = collection.to_dict()
collection_dict["stac_extensions"] = None

pystac.Collection.from_dict(collection_dict, migrate=True)

0 comments on commit 0ed2c02

Please sign in to comment.