Skip to content
Snippets Groups Projects

Support exports version 8 in the load_export command

Merged Valentin Rigal requested to merge support-export-v8 into master
All threads resolved!
1 file
+ 8
2
Compare changes
  • Side-by-side
  • Inline
@@ -100,7 +100,13 @@ class TestLoadExport(FixtureTestCase):
_, temp_file = tempfile.mkstemp(suffix=".db")
with self.assertRaises(CommandError) as context:
call_command("load_export", temp_file, "--email", self.user.email)
self.assertEqual(str(context.exception), f"The SQLite database {temp_file} is not a correct Arkindex export")
self.assertEqual(str(context.exception), (
f"The SQLite database {temp_file} miss some expected tables: "
"['classification', 'dataset', 'dataset_element', 'element', "
"'element_path', 'entity', 'entity_type', 'export_version', "
"'image', 'image_server', 'metadata', 'transcription', "
"'transcription_entity', 'worker_run', 'worker_version']"
))
def test_invalid_version(self):
_, temp_file = tempfile.mkstemp(suffix=".db")
@@ -113,7 +119,7 @@ class TestLoadExport(FixtureTestCase):
with self.assertRaises(CommandError) as context:
call_command("load_export", temp_file, "--email", self.user.email, "--corpus-name", "My corpus")
self.assertEqual(str(context.exception), f"The SQLite database {temp_file} does not have the correct export version")
self.assertEqual(str(context.exception), f"The SQLite database {temp_file} does not have a supported export version")
@patch("arkindex.documents.export.os.unlink")
@patch("arkindex.project.aws.s3.Object")
Loading