def test_try_header_variations4():
    t = BaseTransform()
    t.header_map = {'NAME': 'FULL_NAME', 'AME': 'OTHER'}
    assert (True,
            'FULL_NAME') == t.try_header_variations('Full Name', t.header_map,
                                                    ['FULL_NAME'])
def test_try_header_variations2():
    t = BaseTransform()
    header_map = {'A': 'NAME'}
    assert (True, 'NAME') == t.try_header_variations('name', header_map,
                                                     ['NAME'])
def test_try_header_variations3():
    t = BaseTransform()
    t.header_map = {'COLUMN A': 'NAME'}
    t._generate_variations = lambda s: [s, 'COLUMN ' + s]
    assert (True, 'NAME') == t.try_header_variations('a', t.header_map,
                                                     ['NAME'])
def test_try_header_variations1():
    t = BaseTransform()
    t.header_map = {'0123456789': 'NAME'}
    assert (False, 'A') == t.try_header_variations('A', t.header_map, ['NAME'])
    assert (True, 'NAME') == t.try_header_variations('1123456789',
                                                     t.header_map, ['NAME'])