def test_bounds_valid(landsat_get_mtl): """ Should work as expected (get and parse metadata) """ landsat_get_mtl.return_value = LANDSAT_METADATA meta = landsat8.bounds(LANDSAT_SCENE_C1) assert meta.get('sceneid') == 'LC08_L1TP_016037_20170813_20170814_01_RT' assert len(meta.get('bounds')) == 4
def test_bounds_valid(landsat_get_mtl): """ Should work as expected (get and parse metadata) """ landsat_get_mtl.return_value = LANDSAT_METADATA meta = landsat8.bounds(LANDSAT_SCENE_C1) assert meta.get("sceneid") == LANDSAT_SCENE_C1 assert len(meta.get("bounds")) == 4
def landsat_bounds(scene): """ Handle bounds requests """ info = landsat8.bounds(scene) return ('OK', 'application/json', json.dumps(info))
def bounds(scene): info = landsat8.bounds(scene) return ('OK', 'application/json', json.dumps(info))
def bounds(scene: str) -> Tuple[str, str, str]: """Handle bounds requests.""" return ("OK", "application/json", json.dumps(landsat8.bounds(scene)))
def bounds(scene): """Handle bounds requests.""" info = landsat8.bounds(scene) return ("OK", "application/json", json.dumps(info))