From b224ee44b52b5359ca326ffc8d23d3894ac645d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phan=20Mestach?= Date: Wed, 18 Dec 2024 15:34:16 +0100 Subject: [PATCH] fix remaining xls to xlsx --- iaso/tests/api/test_form_versions.py | 2 +- iaso/tests/api/test_form_versions_readonly.py | 2 +- iaso/tests/odk/test_parsing.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/iaso/tests/api/test_form_versions.py b/iaso/tests/api/test_form_versions.py index 6edb5e250d..6b654ebbe4 100644 --- a/iaso/tests/api/test_form_versions.py +++ b/iaso/tests/api/test_form_versions.py @@ -217,7 +217,7 @@ def test_form_versions_create_ok_first_version(self): self.assertRegex(created_version.file.name, r"forms/new_land_speeder_concept_2020022401(.*).xml") self.assertIsInstance(created_version.xls_file, File) self.assertGreater(created_version.xls_file.size, 100) - self.assertEqual(created_version.xls_file.name, "forms/new_land_speeder_concept_2020022401.xlsx") + self.xls_file.name, (created_version.xls_file.name, r"forms/new_land_speeder_concept_2020022401(.*).xlsx") version_form = created_version.form self.assertEqual("sample1", version_form.form_id) diff --git a/iaso/tests/api/test_form_versions_readonly.py b/iaso/tests/api/test_form_versions_readonly.py index 0fe6401815..fc905cbc57 100644 --- a/iaso/tests/api/test_form_versions_readonly.py +++ b/iaso/tests/api/test_form_versions_readonly.py @@ -27,7 +27,7 @@ def create_add_form(f_name: str, o_unit_type: OrgUnitType, add_to_project: Proje form_1_file_mock = mock.MagicMock(spec=File) form_1_file_mock.name = "test.xml" - with open("iaso/tests/fixtures/odk_form_valid_no_settings.xls", "rb") as xls_file: + with open("iaso/tests/fixtures/odk_form_valid_no_settings.xlsx", "rb") as xls_file: the_form.form_versions.create(file=form_1_file_mock, xls_file=UploadedFile(xls_file), version_id="2020022401") the_form.save() diff --git a/iaso/tests/odk/test_parsing.py b/iaso/tests/odk/test_parsing.py index 46c896d045..24bea95402 100644 --- a/iaso/tests/odk/test_parsing.py +++ b/iaso/tests/odk/test_parsing.py @@ -56,7 +56,7 @@ def test_parse_xls_form_invalid_version_same_as_previous(self): ) def test_parse_xls_form_blatantly_invalid(self): - with open("iaso/tests/fixtures/odk_form_blatantly_invalid.xls", "rb") as xls_file: + with open("iaso/tests/fixtures/odk_form_blatantly_invalid.xlsx", "rb") as xls_file: with self.assertRaises(ParsingError) as cm: parse_xls_form(xls_file) self.assertEqual(