Skip to content

Commit 9dd8f90

Browse files
committed
[geo] Fixed test_filter_devices_by_floorplan - added required indoor field
1 parent ed072a2 commit 9dd8f90

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

openwisp_controller/geo/tests/test_api.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,14 +1028,22 @@ def test_filter_devices_by_floorplan(self):
10281028
device_2 = self._create_device(
10291029
name="device-2", mac_address="00:11:22:33:44:66", organization=org
10301030
)
1031-
location = self._create_location(name="location", type="indoor", organization=org)
1031+
location = self._create_location(
1032+
name="location", type="indoor", organization=org
1033+
)
10321034
floorplan_1 = self._create_floorplan(location=location, floor=1)
10331035
floorplan_2 = self._create_floorplan(location=location, floor=2)
10341036
self._create_device_location(
1035-
content_object=device_1, location=location, floorplan=floorplan_1
1037+
content_object=device_1,
1038+
location=location,
1039+
floorplan=floorplan_1,
1040+
indoor="-1,-2",
10361041
)
10371042
self._create_device_location(
1038-
content_object=device_2, location=location, floorplan=floorplan_2
1043+
content_object=device_2,
1044+
location=location,
1045+
floorplan=floorplan_2,
1046+
indoor="-3,-4",
10391047
)
10401048
path = reverse("config_api:device_list")
10411049
response = self.client.get(f"{path}?floorplan={floorplan_1.pk}")

0 commit comments

Comments
 (0)