From b293908ec15c87ed4f015f6c538678f8f3d67c92 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 19 Sep 2023 12:20:43 +0200 Subject: ✅ Tests: pre-import form - fix import test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ishtar_common/tests.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'ishtar_common/tests.py') diff --git a/ishtar_common/tests.py b/ishtar_common/tests.py index 6cd6db9e3..8726dc559 100644 --- a/ishtar_common/tests.py +++ b/ishtar_common/tests.py @@ -2545,10 +2545,15 @@ class ImportTest(TestCase): imp_model = self.create_importer_model() importer_type = self.create_importer_type(imp_model) + csv_path = os.path.join(LIB_BASE_PATH, "ishtar_common", "tests", "insee-test.csv") data = { "name": "Test Name", "importer_type": importer_type.pk, + "imported_file": SimpleUploadedFile( + name="insee-test.csv", + content=open(csv_path, "rb").read(), + ), "encoding": "utf-8", "csv_sep": '|', "skip_lines": 1, -- cgit v1.2.3