def test_catalog_get_data_location_Landsat(self): c = Catalog() s3path = c.get_data_location(catalog_id='LC81740532014364LGN00') assert s3path == 's3://landsat-pds/L8/174/053/LC81740532014364LGN00'
def test_catalog_search_startDate_and_endDate_only_more_than_one_week_apart( self): c = Catalog() results = c.search(startDate='2004-01-01T00:00:00.000Z', endDate='2012-01-01T00:00:00.000Z') assert len(results) == 1000
def test_catalog_get_data_location_DG(self): c = Catalog() s3path = c.get_data_location(catalog_id='1030010045539700') assert s3path == 's3://receiving-dgcs-tdgplatform-com/055158926010_01_003'
def test_catalog_search_address(): c = Catalog(gbdx) results = c.search_address('Boulder, CO') assert results['stats']['totalRecords'] == 310
def test_catalog_search_wkt_only(): c = Catalog(gbdx) results = c.search( searchAreaWkt= "POLYGON ((30.1 9.9, 30.1 10.1, 29.9 10.1, 29.9 9.9, 30.1 9.9))") assert len(results) == 395
def test_init(): c = Catalog(gbdx) assert isinstance(c, Catalog)
def test_catalog_get_address_coords(): c = Catalog(gbdx) lat, lng = c.get_address_coords('Boulder, CO') assert lat == 40.0149856 assert lng == -105.2705456
def test_catalog_get_data_location_catid_with_no_data(): c = Catalog(gbdx) s3path = c.get_data_location(catalog_id='1010010011AD6E00') assert s3path == None
def test_catalog_get_data_location_nonexistent_catid(): c = Catalog(gbdx) s3path = c.get_data_location(catalog_id='nonexistent_asdfasdfasdfdfasffds') assert s3path == None
def test_catalog_search_address(self): c = Catalog() results = c.search_address('Boulder, CO') self.assertEqual(len(results), 499)
def test_catalog_get_address_coords(self): c = Catalog() lat, lng = c.get_address_coords('Boulder, CO') self.assertTrue(lat == 40.0149856) self.assertTrue(lng == -105.2705456)
def test_init(self): c = Catalog() self.assertTrue(isinstance(c, Catalog))