Skip to content
Snippets Groups Projects

eossr upload unique function

Merged Vuillaume requested to merge eossr_upload into master
Compare and Show latest version
1 file
+ 0
7
Compare changes
  • Side-by-side
  • Inline
@@ -51,19 +51,12 @@ def test_help_all_scripts(script):
def test_eossr_upload(tmpdir):
# file_handle, path_test_filename = tempfile.mkstemp(dir=tmpdir, text=True)
path_test_filename = Path(tmpdir).joinpath('test.txt')
Path(path_test_filename).write_text('Hello World')
published = eossr_upload.upload(zenodo_token=os.getenv('SANDBOX_ZENODO_TOKEN'),
sandbox_flag=True,
input_directory=tmpdir)
record_id = published.json()['id']
# file_handle, path_test_filename = tempfile.mkstemp(dir=tmpdir, text=True)
Path(path_test_filename).write_text('Hello World 2')
published = eossr_upload.upload(os.getenv('SANDBOX_ZENODO_TOKEN'), True, tmpdir, record_id)
# run_script("eossr-upload", "-t", os.getenv('SANDBOX_ZENODO_TOKEN'), '-s', 'True', '-i', tmpdir)
# _, path_test_filename = tempfile.mkstemp(dir=tmpdir, text='Hello World 2')
# run_script("eossr-upload", "-t", os.getenv('SANDBOX_ZENODO_TOKEN'), '-s', 'True', '-i', tmpdir, '-id', 927522)
Loading