def test_internal_method_parsed_sheet_normalx():
    """
    edge cases:
     * sheet has only column headers (no values)
     * sheet has no rows
    should return an empty list
    """
    sheet_dicts = _to_dicts(_parsed_sheet([['h1', 'h2']]))
    assert sheet_dicts == []

    sheet_dicts = _to_dicts(_parsed_sheet([]))
    assert sheet_dicts == []
def test_internal_method_parsed_sheet_normalx():
    '''
    edge cases:
     * sheet has only column headers (no values)
     * sheet has no rows
    should return an empty list
    '''
    sheet_dicts = _to_dicts(_parsed_sheet([['h1', 'h2']]))
    assert sheet_dicts == []

    sheet_dicts = _to_dicts(_parsed_sheet([]))
    assert sheet_dicts == []
def test_internal_method_parsed_sheet_normal():
    """
    in xls_to_ss_structure, the internal method
    _parsed_sheet(...) accepts a list of lists and
    returns a list of dicts
    """
    sheet_dicts = _parsed_sheet([['h1', 'h2'],
                                 ['r1v1', 'r1v2'],
                                 ['r2v1', 'r2v2']])
    sheet_dicts = _to_dicts(sheet_dicts)

    assert sheet_dicts == [
            {'h1': 'r1v1', 'h2': 'r1v2'},
            {'h1': 'r2v1', 'h2': 'r2v2'},
        ]
def test_internal_method_parsed_sheet_normal():
    '''
    in xls_to_ss_structure, the internal method
    _parsed_sheet(...) accepts a list of lists and
    returns a list of dicts
    '''
    sheet_dicts = _parsed_sheet([['h1', 'h2'],
                                 ['r1v1', 'r1v2'],
                                 ['r2v1', 'r2v2']])
    sheet_dicts = _to_dicts(sheet_dicts)

    assert sheet_dicts == [
            {'h1': 'r1v1', 'h2': 'r1v2'},
            {'h1': 'r2v1', 'h2': 'r2v2'},
        ]