Skip to content

Commit

Permalink
fix: only test existence of mosaics (#872)
Browse files Browse the repository at this point in the history
  • Loading branch information
12rambau authored Sep 1, 2023
2 parents dbc8c46 + 774540e commit eb133bc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 53 deletions.
6 changes: 3 additions & 3 deletions tests/test_planetapi/test_PlanetModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,19 +155,19 @@ def test_get_planet_items(planet_key: str, data_regression) -> None:


@pytest.mark.skipif("PLANET_API_KEY" not in os.environ, reason="requires Planet")
def test_get_mosaics(planet_key: str, data_regression) -> None:
def test_get_mosaics(planet_key: str) -> None:
"""Get all the subscriptions from the Planet API.
Args:
planet_key: the planet API key
data_regression: the pytest regression fixture
"""
planet_model = PlanetModel(planet_key)
mosaics = planet_model.get_mosaics()
mosaics = hide_key(mosaics, planet_key) # hide the key in the produced file
mosaics = [m["name"] for m in mosaics]

data_regression.check(mosaics)
# the list is constantly changing, we simply check that there is at least one
assert len(mosaics) > 0


@pytest.mark.skipif("PLANET_API_KEY" not in os.environ, reason="requires Planet")
Expand Down
50 changes: 0 additions & 50 deletions tests/test_planetapi/test_PlanetModel/test_get_mosaics.yml

This file was deleted.

0 comments on commit eb133bc

Please sign in to comment.