Beispiel #1
0
def test_can_handle_query(time):
    # Don't use the fixture, as hypothesis complains
    suvi_client = goes.SUVIClient()
    ans1 = suvi_client._can_handle_query(time, a.Instrument.suvi)
    assert ans1 is True
    ans2 = suvi_client._can_handle_query(time, a.Instrument.suvi,
                                         a.Wavelength(131 * u.Angstrom))
    assert ans2 is True
    ans3 = suvi_client._can_handle_query(time, a.Instrument.suvi,
                                         a.Wavelength(131 * u.Angstrom),
                                         a.Level.two)
    assert ans3 is True
    ans4 = suvi_client._can_handle_query(time)
    assert ans4 is False
    ans5 = suvi_client._can_handle_query(time, a.Instrument.aia)
    assert ans5 is False
    ans6 = suvi_client._can_handle_query(time, a.Instrument.suvi,
                                         a.goes.SatelliteNumber(16))
    assert ans6 is True
Beispiel #2
0
def suvi_client():
    return goes.SUVIClient()