Skip to content

Commit 4d0cafc

Browse files
committed
[qa] Minor refactoring
Signed-off-by: DragnEmperor <[email protected]>
1 parent 3346bfc commit 4d0cafc

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

docs/user/whois.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ associated with the device's public IP address and includes:
3030
- Timezone of the ASN's registered location
3131
- Coordinates (Latitude and Longitude)
3232

33-
.. _whois_trigger_conditions:
34-
3533
Trigger Conditions
3634
------------------
3735

openwisp_controller/config/whois/tests/utils.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,9 @@ def _task_called(self, mocked_task, task_name="WHOIS lookup"):
6161
org = self._get_org()
6262

6363
with self.subTest(f"{task_name} task called when last_ip is public"):
64-
with mock.patch("django.core.cache.cache.get") as mocked_get, mock.patch(
65-
"django.core.cache.cache.set"
66-
) as mocked_set:
67-
mocked_get.side_effect = [None, org.config_settings]
64+
with mock.patch(
65+
"django.core.cache.cache.get", side_effect=[None, org.config_settings]
66+
) as mocked_get, mock.patch("django.core.cache.cache.set") as mocked_set:
6867
device = self._create_device(last_ip="172.217.22.14")
6968
mocked_task.assert_called()
7069
mocked_set.assert_called_once()

0 commit comments

Comments
 (0)