Skip to content

Commit e86aa17

Browse files
author
Alexandre Vincent
committed
[fix] Fixes for the sample_config admin tests previously added.
1 parent 30f69cc commit e86aa17

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

openwisp_controller/config/tests/test_admin.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2229,7 +2229,7 @@ def test_device_with_config_change_deactivate_deactivate(self):
22292229
self.assertContains(
22302230
response,
22312231
'<div class="readonly">',
2232-
22,
2232+
23,
22332233
)
22342234
# Save buttons are absent on deactivated device
22352235
self.assertNotContains(response, self._save_btn_html)
@@ -2312,9 +2312,9 @@ def _test_device_changelist_activate_deactivate_admin_action(
23122312
)
23132313
multiple_success_message_html = (
23142314
f'<li class="success">The following devices were {html_method}ed'
2315-
f' successfully: <a href="/admin/config/device/{device1.id}/change/">'
2316-
f'{device1.name}</a>, <a href="/admin/config/device/{device2.id}/change/">'
2317-
f'{device2.name}</a> and <a href="/admin/config/device/{device3.id}/'
2315+
f' successfully: <a href="/admin/{self.app_label}/device/{device1.id}/change/">'
2316+
f'{device1.name}</a>, <a href="/admin/{self.app_label}/device/{device2.id}/change/">'
2317+
f'{device2.name}</a> and <a href="/admin/{self.app_label}/device/{device3.id}/'
23182318
f'change/">{device3.name}</a>.</li>'
23192319
)
23202320
single_error_message_html = (

tests/openwisp2/sample_config/tests.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,9 @@ class TestVxlan(BaseTestVxlan):
119119

120120

121121
del BaseTestAdmin
122+
del BaseTestTransactionAdmin
122123
del BaseTestDeviceGroupAdmin
124+
del BaseTestDeviceGroupAdminTransaction
123125
del BaseTestConfig
124126
del BaseTestTransactionConfig
125127
del BaseTestController

0 commit comments

Comments
 (0)