Exemplo n.º 1
0
def test_bounds_valid(monkeypatch):
    """
    Should work as expected (get bounds)
    """

    monkeypatch.setattr(cbers, 'CBERS_BUCKET', CBERS_BUCKET)

    meta = cbers.bounds(CBERS_SCENE)
    assert meta.get('sceneid') == 'CBERS_4_MUX_20171121_057_094_L2'
    assert len(meta.get('bounds')) == 4
Exemplo n.º 2
0
def test_bounds_valid(monkeypatch):
    """
    Should work as expected (get bounds)
    """

    monkeypatch.setattr(cbers, "CBERS_BUCKET", CBERS_BUCKET)

    meta = cbers.bounds(CBERS_MUX_SCENE)
    assert meta.get("sceneid") == CBERS_MUX_SCENE
    assert len(meta.get("bounds")) == 4

    meta = cbers.bounds(CBERS_AWFI_SCENE)
    assert meta.get("sceneid") == CBERS_AWFI_SCENE
    assert len(meta.get("bounds")) == 4

    meta = cbers.bounds(CBERS_PAN10M_SCENE)
    assert meta.get("sceneid") == CBERS_PAN10M_SCENE
    assert len(meta.get("bounds")) == 4

    meta = cbers.bounds(CBERS_PAN5M_SCENE)
    assert meta.get("sceneid") == CBERS_PAN5M_SCENE
    assert len(meta.get("bounds")) == 4
Exemplo n.º 3
0
def bounds(scene):
    """Handle bounds requests
    """
    info = cbers.bounds(scene)
    return ('OK', 'application/json', json.dumps(info))
Exemplo n.º 4
0
def bounds(scene: str) -> Tuple[str, str, str]:
    """Handle bounds requests."""
    return ("OK", "application/json", json.dumps(cbers.bounds(scene)))
Exemplo n.º 5
0
def bounds(scene):
    """Handle bounds requests."""
    info = cbers.bounds(scene)
    return ("OK", "application/json", json.dumps(info))