From cee72b014e2153d442346c1baa3ebf9bedd3a7c8 Mon Sep 17 00:00:00 2001 From: Muma Bwalya Date: Tue, 8 Oct 2024 10:51:00 +0200 Subject: [PATCH] Fixed failing tests --- tests/points/models/test_location.py | 2 +- tests/profile/admin/test_profile_highlights_admin.py | 2 +- tests/profile/admin/test_profile_key_metrics_admin.py | 2 +- wazimap_ng/profile/admin/admins/profile_key_metrics_admin.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/points/models/test_location.py b/tests/points/models/test_location.py index 716af2cf..78632b55 100644 --- a/tests/points/models/test_location.py +++ b/tests/points/models/test_location.py @@ -22,4 +22,4 @@ def test_search_vector_content(self): ) assert Location.objects.all().count() == 1 location = Location.objects.all().first() - assert location.content_search == "'attribute1':3A 'attribute2':7A 'key':2A,6A 'test':1A 'valu':4A,8A 'value1':5A 'value2':9A" + assert location.content_search == "'attribute1':3A 'attribute2':7A 'key':2A,6A 'test':1A 'value':4A,8A 'value1':5A 'value2':9A" diff --git a/tests/profile/admin/test_profile_highlights_admin.py b/tests/profile/admin/test_profile_highlights_admin.py index 1c842adb..c25a380c 100644 --- a/tests/profile/admin/test_profile_highlights_admin.py +++ b/tests/profile/admin/test_profile_highlights_admin.py @@ -36,5 +36,5 @@ def test_fieldset(self, mocked_request, profile_highlight): base_fields = list(ma.get_form(mocked_request, profile_highlight).base_fields) assert base_fields == [ - "label", "indicator", "subindicator", "denominator", "change_reason" + "label", "indicator", "subindicator", "denominator", "display_format", "change_reason" ] diff --git a/tests/profile/admin/test_profile_key_metrics_admin.py b/tests/profile/admin/test_profile_key_metrics_admin.py index 12a354e7..39ce6c92 100644 --- a/tests/profile/admin/test_profile_key_metrics_admin.py +++ b/tests/profile/admin/test_profile_key_metrics_admin.py @@ -38,5 +38,5 @@ def test_fieldset(self, mocked_request, profile_key_metric): base_fields = list(ma.get_form(mocked_request, profile_key_metric).base_fields) assert base_fields == [ - "subcategory", "label", "variable", "subindicator", "denominator", "change_reason" + "subcategory", "label", "variable", "subindicator", "denominator", "display_format", "change_reason" ] diff --git a/wazimap_ng/profile/admin/admins/profile_key_metrics_admin.py b/wazimap_ng/profile/admin/admins/profile_key_metrics_admin.py index 48b33356..7ecc1a68 100644 --- a/wazimap_ng/profile/admin/admins/profile_key_metrics_admin.py +++ b/wazimap_ng/profile/admin/admins/profile_key_metrics_admin.py @@ -29,7 +29,7 @@ class ProfileKeyMetricsAdmin(SortableAdminMixin, BaseAdminModel, HistoryAdmin): fieldsets = ( ("Profile fields", { - "fields": ("profile", "subcategory", "label", "variable", "subindicator", "denominator") + "fields": ("profile", "subcategory", "label", "variable", "subindicator", "denominator", "display_format") }), ) form = ProfileKeyMetricsForm