def test_create_import_data_file_for_supplier_for_framework_agreement():
    dir_path = tempfile.mkdtemp()
    create_import_data_file_for_documents(
        FRAMEWORK_AGREEMENT_IMPORT_DATA_LIST,
        dir_path,
        'digital-outcomes-and-specialists',
        'framework_agreement'
    )
    with open('tests/fixtures/example-dos-framework-agreement-import-data.txt') as example_import_data_file:  # noqa
        created_file_path = os.path.join(dir_path, 'framework_agreement_import_data.txt')
        try:
            assert os.path.isfile(created_file_path)
            with open(created_file_path) as created_file:
                example_import_data_file_contents = example_import_data_file.read()
                created_file_contents = created_file.read()

                assert example_import_data_file_contents == created_file_contents
        finally:
            shutil.rmtree(dir_path)
def test_create_import_data_file_for_supplier_for_result_letter():
    dir_path = tempfile.mkdtemp()
    create_import_data_file_for_documents(
        RESULT_LETTER_IMPORT_DATA_LIST,
        dir_path,
        'digital-outcomes-and-specialists',
        'result_letter'
    )
    with open('tests/fixtures/example-dos-result-letter-import-data.txt') as example_import_data_file:  # noqa
        created_file_path = os.path.join(dir_path, 'result_letter_import_data.txt')
        try:
            assert os.path.isfile(created_file_path)
            with open(created_file_path) as created_file:
                example_import_data_file_contents = example_import_data_file.read()
                created_file_contents = created_file.read()

                assert example_import_data_file_contents == created_file_contents
        finally:
            shutil.rmtree(dir_path)