Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions openwisp_controller/config/tests/test_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -2116,7 +2116,7 @@ def test_device_with_config_change_deactivate_deactivate(self):
self.assertContains(
response,
'<div class="readonly">',
22,
23,
)
# Save buttons are absent on deactivated device
self.assertNotContains(response, self._save_btn_html)
Expand Down Expand Up @@ -2199,9 +2199,9 @@ def _test_device_changelist_activate_deactivate_admin_action(
)
multiple_success_message_html = (
f'<li class="success">The following devices were {html_method}ed'
f' successfully: <a href="/admin/config/device/{device1.id}/change/">'
f'{device1.name}</a>, <a href="/admin/config/device/{device2.id}/change/">'
f'{device2.name}</a> and <a href="/admin/config/device/{device3.id}/'
f' successfully: <a href="/admin/{self.app_label}/device/{device1.id}/change/">'
f'{device1.name}</a>, <a href="/admin/{self.app_label}/device/{device2.id}/change/">'
f'{device2.name}</a> and <a href="/admin/{self.app_label}/device/{device3.id}/'
f'change/">{device3.name}</a>.</li>'
)
single_error_message_html = (
Expand Down
16 changes: 15 additions & 1 deletion tests/openwisp2/sample_config/tests.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
from openwisp_controller.config.tests.test_admin import TestAdmin as BaseTestAdmin
from openwisp_controller.config.tests.test_admin import (
TestAdmin as BaseTestAdmin,
TestTransactionAdmin as BaseTestTransactionAdmin,
)
from openwisp_controller.config.tests.test_admin import (
TestDeviceGroupAdmin as BaseTestDeviceGroupAdmin,
TestDeviceGroupAdminTransaction as BaseTestDeviceGroupAdminTransaction,
)
from openwisp_controller.config.tests.test_api import TestConfigApi as BaseTestConfigApi
from openwisp_controller.config.tests.test_apps import TestApps as BaseTestApps
Expand Down Expand Up @@ -38,10 +42,18 @@ class TestAdmin(BaseTestAdmin):
app_label = 'sample_config'


class TestTransactionAdmin(BaseTestTransactionAdmin):
app_label = 'sample_config'


class TestDeviceGroupAdmin(BaseTestDeviceGroupAdmin):
app_label = 'sample_config'


class TestDeviceGroupAdminTransaction(BaseTestDeviceGroupAdminTransaction):
app_label = 'sample_config'


class TestConfig(BaseTestConfig):
pass

Expand Down Expand Up @@ -107,7 +119,9 @@ class TestVxlan(BaseTestVxlan):


del BaseTestAdmin
del BaseTestTransactionAdmin
del BaseTestDeviceGroupAdmin
del BaseTestDeviceGroupAdminTransaction
del BaseTestConfig
del BaseTestTransactionConfig
del BaseTestController
Expand Down