From 17e4cbbfec2bbe378dc73ffe500cb452cbf9f137 Mon Sep 17 00:00:00 2001 From: Kelvin Muchiri Date: Fri, 10 Jan 2025 12:20:13 +0300 Subject: [PATCH] fix failing tests --- onadata/apps/main/tests/test_form_metadata.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/onadata/apps/main/tests/test_form_metadata.py b/onadata/apps/main/tests/test_form_metadata.py index 67512ca8c4..b9134ea74f 100644 --- a/onadata/apps/main/tests/test_form_metadata.py +++ b/onadata/apps/main/tests/test_form_metadata.py @@ -65,7 +65,11 @@ def _add_metadata(self, data_type="doc"): }, ) else: - self.doc = MetaData.objects.filter(data_type="supporting_doc")[0] + self.doc = ( + MetaData.objects.all() + .exclude(data_type="export_repeat_register") + .reverse()[0] + ) self.doc_url = reverse( download_metadata, kwargs={