def test_history_import_symlink():
 with HistoryArchive() as history_archive:
  history_archive.write_metafiles()
  history_archive.write_link('datasets/Pasted_Entry_1.txt', '../target.txt')
  history_archive.write_file('target.txt', 'insecure')
  _run_jihaw_cleanup(history_archive, 'Symlink dataset in import archive allowed')

def test_history_import_symlink ( ) : with HistoryArchive ( ) as history_archive : history_archive . write_metafiles ( ) history_archive . write_link ( 'datasets/Pasted_Entry_1.txt' , '../target.txt' ) history_archive . write_file ( 'target.txt' , 'insecure' ) _run_jihaw_cleanup ( history_archive , 'Symlink dataset in import archive allowed' )
ensure a history containing a dataset that is a symlink cannot be imported .