def get_test_data_upload(creator, dataset, filename=TEST_DATA_FILENAME, encoding='utf8'):
    # Ensure panda subdir has been created
    try:
        os.mkdir(settings.MEDIA_ROOT)
    except __HOLE__:
        pass

    src = os.path.join(TEST_DATA_PATH, filename)
    dst = os.path.join(settings.MEDIA_ROOT, filename)
    copyfile(src, dst)

    return DataUpload.objects.create(
        filename=filename,
        original_filename=filename,
        size=os.path.getsize(dst),
        creator=creator,
        dataset=dataset,
        encoding=encoding)
dataset/ETHPy150Open pandaproject/panda/panda/tests/utils.py/get_test_data_upload