Skip to content

Commit

Permalink
[fix] Fixed failing of indoor location test in openwisp-controller
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Aryamanz29 committed Apr 19, 2023
1 parent 634e64c commit 2f36fca
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion django_loci/tests/base/test_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 2f36fca

Please sign in to comment.