Skip to content

Commit

Permalink
Merge pull request #230 from stac-utils/fix-test-warning
Browse files Browse the repository at this point in the history
update assert test warnings
  • Loading branch information
jonhealy1 authored Nov 20, 2023
2 parents 1c8b4c4 + 42469ce commit 5ff4944
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,9 @@ stac-validator https://raw.githubusercontent.com/radiantearth/stac-spec/master/e

## Requirements

- Python 3.7+
- Python 3.8+
- Requests
- Click
- Pytest
- Jsonschema

Note: Stac-validator is also used in stac-check which adds linting messages based on the official STAC best practices document.
Expand Down
6 changes: 2 additions & 4 deletions tests/test_validate_dict.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,12 @@ def test_correct_validate_dict_return_method():
stac = stac_validator.StacValidate()
with open("tests/test_data/1rc2/extensions-collection/collection.json", "r") as f:
good_stac = json.load(f)
if stac.validate_dict(good_stac) is True:
return True
assert stac.validate_dict(good_stac)


def test_incorrect_validate_dict_return_method():
stac = stac_validator.StacValidate()
with open("tests/test_data/1rc2/extensions-collection/collection.json", "r") as f:
good_stac = json.load(f)
bad_stac = good_stac.pop("type", None)
if stac.validate_dict(bad_stac) is False:
return True
assert stac.validate_dict(bad_stac) is False

0 comments on commit 5ff4944

Please sign in to comment.