Fix export ro-crate to file source

Write to the store the correct archive file
This commit is contained in:
davelopez
2022-09-16 17:19:49 +02:00
parent e1daab1768
commit 0128e05a23
2 changed files with 6 additions and 2 deletions
+2 -2
View File
@@ -2240,8 +2240,8 @@ class ROCrateArchiveModelExportStore(DirectoryModelExportStore, WriteCrates):
else:
file_source_path = self.file_sources.get_file_source_path(self.file_source_uri)
file_source = file_source_path.file_source
assert os.path.exists(self.out_file)
file_source.write_from(file_source_path.path, self.out_file)
assert os.path.exists(rval), rval
file_source.write_from(file_source_path.path, rval)
shutil.rmtree(self.temp_output_dir)
+4
View File
@@ -58,6 +58,10 @@ class WorkflowTasksIntegrationTestCase(
ro_crate_path = self._export_ro_crate(False)
assert CompressedFile(ro_crate_path).file_type == "zip"
def test_export_ro_crate_to_uri(self):
ro_crate_path = self._export_ro_crate(True)
assert CompressedFile(ro_crate_path).file_type == "zip"
def _export_ro_crate(self, to_uri):
with self.dataset_populator.test_history() as history_id:
summary = self._run_workflow_with_runtime_data_column_parameter(history_id)