def test_transform_move_tsvs(mock_file_system):
    airflow_path = mock_file_system[0]
    source_dir = mock_file_system[1]
    symphony_tsv = (source_dir / 'sample.tsv')
    symphony_tsv.write_text('CATKEY\tCALL_NUMBER_TYPE\tBARCODE\n123456\tLC 12345\t45677  ')
    tsv_directory = (airflow_path / 'migration/data/items')
    tsv_directory.mkdir(parents=True)
    sample_tsv = (tsv_directory / 'sample.tsv')
    column_transforms = [('CATKEY', (lambda x: f'a{x}')), ('BARCODE', (lambda x: x.strip()))]
    transform_move_tsvs(airflow=airflow_path, column_transforms=column_transforms, source='symphony')
    f = open(sample_tsv, 'r')
    assert (f.readlines()[1] == 'a123456\tLC 12345\t45677\n')
    f.close()
def test_transform_move_tsvs(mock_file_system):
    airflow_path = mock_file_system[0]
    source_dir = mock_file_system[1]
    symphony_tsv = (source_dir / 'sample.tsv')
    symphony_tsv.write_text('CATKEY\tCALL_NUMBER_TYPE\tBARCODE\n123456\tLC 12345\t45677  ')
    tsv_directory = (airflow_path / 'migration/data/items')
    tsv_directory.mkdir(parents=True)
    sample_tsv = (tsv_directory / 'sample.tsv')
    column_transforms = [('CATKEY', (lambda x: f'a{x}')), ('BARCODE', (lambda x: x.strip()))]
    transform_move_tsvs(airflow=airflow_path, column_transforms=column_transforms, source='symphony')
    f = open(sample_tsv, 'r')
    assert (f.readlines()[1] == 'a123456\tLC 12345\t45677\n')
    f.close()