예제 #1
0
def test_bounds_valid(monkeypatch):
    """
    Should work as expected (get bounds)
    """

    monkeypatch.setattr(sentinel2, "SENTINEL_BUCKET", SENTINEL_BUCKET)

    meta = sentinel2.bounds(SENTINEL_SCENE)
    assert meta.get("sceneid") == "S2A_tile_20170729_19UDP_0"
    assert len(meta.get("bounds")) == 4
예제 #2
0
def test_bounds_valid(monkeypatch):
    """
    Should work as expected (get bounds)
    """

    monkeypatch.setattr(sentinel2, 'SENTINEL_BUCKET', SENTINEL_BUCKET)

    meta = sentinel2.bounds(SENTINEL_SCENE)
    assert meta.get('sceneid') == 'S2A_tile_20170729_19UDP_0'
    assert len(meta.get('bounds')) == 4
예제 #3
0
def bounds(scene):
    """Handle bounds requests
    """
    info = sentinel2.bounds(scene)
    return ('OK', 'application/json', json.dumps(info))
예제 #4
0
def bounds(scene: str) -> Tuple[str, str, str]:
    """Handle bounds requests."""
    return ("OK", "application/json", json.dumps(sentinel2.bounds(scene)))
예제 #5
0
def bounds(scene):
    """Handle bounds requests."""
    info = sentinel2.bounds(scene)
    return ("OK", "application/json", json.dumps(info))