Skip to content

Commit cdda721

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

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
@@ -2116,7 +2116,7 @@ def test_device_with_config_change_deactivate_deactivate(self):
21162116
self.assertContains(
21172117
response,
21182118
'<div class="readonly">',
2119-
22,
2119+
23,
21202120
)
21212121
# Save buttons are absent on deactivated device
21222122
self.assertNotContains(response, self._save_btn_html)
@@ -2199,9 +2199,9 @@ def _test_device_changelist_activate_deactivate_admin_action(
21992199
)
22002200
multiple_success_message_html = (
22012201
f'<li class="success">The following devices were {html_method}ed'
2202-
f' successfully: <a href="/admin/config/device/{device1.id}/change/">'
2203-
f'{device1.name}</a>, <a href="/admin/config/device/{device2.id}/change/">'
2204-
f'{device2.name}</a> and <a href="/admin/config/device/{device3.id}/'
2202+
f' successfully: <a href="/admin/{self.app_label}/device/{device1.id}/change/">'
2203+
f'{device1.name}</a>, <a href="/admin/{self.app_label}/device/{device2.id}/change/">'
2204+
f'{device2.name}</a> and <a href="/admin/{self.app_label}/device/{device3.id}/'
22052205
f'change/">{device3.name}</a>.</li>'
22062206
)
22072207
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)