From 2f36fca6a73bd0fef1f78da3cae7502546a1cb15 Mon Sep 17 00:00:00 2001 From: Aryaman Date: Wed, 19 Apr 2023 21:02:31 +0530 Subject: [PATCH] [fix] Fixed failing of indoor location test in openwisp-controller Fixed a failing indoor location test in the 'geo' app of openwisp-controller by modifying the filter_url to consider the app_label during execution. Previously, the test 'test_floorplan_add_view_filters_indoor_location' was failing due to a hardcoded filter_url. --- django_loci/tests/base/test_admin.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/django_loci/tests/base/test_admin.py b/django_loci/tests/base/test_admin.py index 2b64747..1611b23 100644 --- a/django_loci/tests/base/test_admin.py +++ b/django_loci/tests/base/test_admin.py @@ -7,6 +7,7 @@ class BaseTestAdmin(TestAdminMixin, TestLociMixin): + app_label = 'django_loci' geocode_url = 'https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/' def test_location_list(self): @@ -86,7 +87,9 @@ def test_floorplan_add_view_filters_indoor_location(self): name='test-admin-outdoor-location', type='outdoor' ) url = reverse('{0}_floorplan_add'.format(self.url_prefix)) - filter_url = '/admin/django_loci/location/?_to_field=id&type__exact=indoor' + filter_url = ( + f'/admin/{self.app_label}/location/?_to_field=id&type__exact=indoor' + ) r1 = self.client.get(url) self.assertContains( r1,