Ejemplo n.º 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
Ejemplo n.º 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
Ejemplo n.º 3
0
def bounds(scene):
    """Handle bounds requests
    """
    info = sentinel2.bounds(scene)
    return ('OK', 'application/json', json.dumps(info))
Ejemplo n.º 4
0
def bounds(scene: str) -> Tuple[str, str, str]:
    """Handle bounds requests."""
    return ("OK", "application/json", json.dumps(sentinel2.bounds(scene)))
Ejemplo n.º 5
0
def bounds(scene):
    """Handle bounds requests."""
    info = sentinel2.bounds(scene)
    return ("OK", "application/json", json.dumps(info))