Skip to content

Commit

Permalink
Use EarthDataStore() when possible in unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rle-earthdaily committed Jul 5, 2024
1 parent dbf0810 commit 3fb1f38
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
12 changes: 9 additions & 3 deletions tests/test_geometrymanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,14 @@ def test_two_geometry_geojson(self):
}

gM = geometry_manager.GeometryManager(geom)
import earthdaily
eds = earthdaily.earthdatastore.Auth()
cube = eds.datacube("sentinel-2-l2a", assets=['blue','green','red'], datetime="2022-08",intersects = gM.to_geopandas())
from earthdaily import EarthDataStore
eds = EarthDataStore()
cube = eds.datacube(
"sentinel-2-l2a",
assets=['blue','green','red'],
datetime="2022-08",
intersects = gM.to_geopandas()
)

if __name__ == "__main__":
unittest.main()
4 changes: 1 addition & 3 deletions tests/test_simple_datacube.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import unittest

import earthdaily


class TestEarthDataStore(unittest.TestCase):
def setUp(self):
self.eds = earthdaily.earthdatastore.Auth()
self.eds = earthdaily.EarthDataStore()
self.pivot = earthdaily.datasets.load_pivot()
self.pivot_corumba = earthdaily.datasets.load_pivot_corumba()

Expand Down

0 comments on commit 3fb1f38

Please sign in to comment.