Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_init(self):
c = Idaho()
self.assertTrue(isinstance(c, Idaho))
def test_init(self):
c = Idaho()
self.assertTrue(isinstance(c, Idaho))
def test_idaho_get_chip(self):
i = Idaho()
catid = '10400100203F1300'
result = i.get_chip([-105.00032901763916, 39.91207173503864, -104.99874114990234, 39.91310862390189], catid)
assert result
def test_idaho_describe_images(self):
i = Idaho()
catid = '10400100203F1300'
description = i.describe_images(i.get_images_by_catid(catid=catid))
assert description['10400100203F1300']['parts'][1]['PAN']['id'] == 'b1f6448b-aecd-4d9b-99ec-9cad8d079043'
def test_idaho_get_chip2(self):
i = Idaho()
catid = '10400100384B1B00'
result = i.get_chip([120.45363429504926, 30.247785383721883, 120.45511487442548, 30.249008773017273], catid)
assert result
def test_idaho_get_images_by_catid(self):
i = Idaho()
catid = '10400100203F1300'
results = i.get_images_by_catid(catid=catid)
assert len(results['results']) == 12
def test_idaho_get_images_by_catid_and_aoi(self):
i = Idaho()
catid = '10400100203F1300'
aoi_wkt = "POLYGON ((-105.0207996368408345 39.7338828628182839, -105.0207996368408345 39.7365972921260067, -105.0158751010894775 39.7365972921260067, -105.0158751010894775 39.7338828628182839, -105.0207996368408345 39.7338828628182839))"
results = i.get_images_by_catid_and_aoi(catid=catid, aoi_wkt=aoi_wkt)
assert len(results['results']) == 2
self.logger = interface.logger
# create and store an instance of the GBDX s3 client
self.s3 = S3()
# create and store an instance of the GBDX Ordering Client
self.ordering = Ordering()
# create and store an instance of the GBDX Catalog Client
self.catalog = Catalog()
# create and store an instance of the GBDX Workflow Client
self.workflow = Workflow()
# create and store an instance of the Idaho Client
self.idaho = Idaho()
self.vectors = Vectors()
self.catalog_image = CatalogImage
self.idaho_image = IdahoImage
self.landsat_image = LandsatImage
self.sentinel2 = Sentinel2
self.tms_image = TmsImage
self.dem_image = DemImage
self.wv03_vnir = WV03_VNIR
self.wv02 = WV02
self.ge01 = GE01
self.s3_image = S3Image
self.graph_image = GraphImage
self.task_registry = TaskRegistry()
self.logger = interface.logger
# create and store an instance of the GBDX s3 client
self.s3 = S3()
# create and store an instance of the GBDX Ordering Client
self.ordering = Ordering()
# create and store an instance of the GBDX Catalog Client
self.catalog = Catalog()
# create and store an instance of the GBDX Workflow Client
self.workflow = Workflow()
# create and store an instance of the Idaho Client
self.idaho = Idaho()
self.vectors = Vectors()
self.catalog_image = CatalogImage
self.idaho_image = IdahoImage
self.landsat_image = LandsatImage
self.modis = Modis
self.sentinel1 = Sentinel1
self.sentinel2 = Sentinel2
self.tms_image = TmsImage
self.dem_image = DemImage
self.wv03_vnir = WV03_VNIR
self.wv03_swir = WV03_SWIR
self.wv02 = WV02
self.wv04 = WV04
self.ge01 = GE01