Exemplo n.º 1
0
def test_construct_extent():
    # yes this is coverage bingo
    ext = va.Extent(10, 20, 30, 40, 'FULLDISK')
    assert ext.x == 10
    assert ext.y == 20
    assert ext.width == 30
    assert ext.length == 40
    assert ext.type == 'FULLDISK'
Exemplo n.º 2
0
def test_QueryResponse_build_table_with_extent_type(mock_build_client):
    """
    When explicitly suppling an 'Extent' only the 'type' is stored
    in the built table.
    """
    e_type = va.Extent(x=1.0, y=2.5, width=37, length=129.2, atype='CORONA')
    qr = vso.QueryResponse((MockQRRecord(extent_type=e_type),))
    table = qr.build_table()
    extent = table['Extent Type'].data
    assert len(extent) == 1
    assert extent[0] == e_type.type