def test_bidx_makeready_default(minimal_prod, minimal_dc):
    bidx = BandIndex(minimal_prod, {})
    bidx.make_ready(minimal_dc)
    assert bidx.ready
    assert bidx.band("band1") == "band1"
    assert bidx.band("band2") == "band2"
    assert bidx.band("band3") == "band3"
    assert bidx.band("band4") == "band4"
    assert bidx.nodata_val("band1") == -999
    assert isinstance(bidx.nodata_val("band4"), float)
def test_bidx_p_unready(minimal_prod):
    bidx = BandIndex(minimal_prod, {"foo": ["foo"]})
    with pytest.raises(OWSConfigNotReady) as excinfo:
        x = bidx.native_bands
    assert "native_bands" in str(excinfo.value)
    with pytest.raises(OWSConfigNotReady) as excinfo:
        x = bidx.nodata_val("foo")
    assert "_nodata_vals" in str(excinfo.value)