From 6634d0882047392cb5e2f95335ee70c557232015 Mon Sep 17 00:00:00 2001
From: Valentin Rigal <rigal@teklia.com>
Date: Tue, 21 May 2024 14:43:02 +0200
Subject: [PATCH] Update tests

---
 arkindex/documents/tests/commands/test_load_export.py | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/arkindex/documents/tests/commands/test_load_export.py b/arkindex/documents/tests/commands/test_load_export.py
index 3bf8e45290..35cc0bedcc 100644
--- a/arkindex/documents/tests/commands/test_load_export.py
+++ b/arkindex/documents/tests/commands/test_load_export.py
@@ -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")
-- 
GitLab