Skip to content

Commit 6ccdbc6

Browse files
author
hrfuller
committed
tests
1 parent 0a2a57c commit 6ccdbc6

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

descarteslabs/tests/test_metadata.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,10 +190,23 @@ def test_products_get(self):
190190
def test_bands_get(self):
191191
band_id = 'landsat:LC08:PRE:TOAR:red'
192192
try:
193-
self.instance.get_band(band_id)
193+
band = self.instance.get_band(band_id)
194+
self.assertEqual(band_id, band['id'])
194195
except NotFoundError:
195196
pass
196197

198+
def test_derived_bands_get(self):
199+
band_id = 'derived:ndvi'
200+
try:
201+
d_band = self.instance.get_derived_band(band_id)
202+
self.assertIn('bands', d_band)
203+
except NotFoundError:
204+
pass
205+
206+
def test_derived_bands_search(self):
207+
bands = ['red', 'nir']
208+
bands = self.instance.derived_bands(bands=bands)
209+
197210

198211
if __name__ == '__main__':
199212
unittest.main()

0 commit comments

Comments
 (0)