File tree Expand file tree Collapse file tree
openwisp_controller/config/tests
tests/openwisp2/sample_config Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2190,6 +2190,8 @@ def _get_delete_btn_html(self, device):
21902190 'Delete</a></p>'
21912191 )
21922192
2193+ _deactivated_device_expected_readonly_fields = 22
2194+
21932195 def test_device_with_config_change_deactivate_deactivate (self ):
21942196 """
21952197 This test checks the following things
@@ -2229,7 +2231,7 @@ def test_device_with_config_change_deactivate_deactivate(self):
22292231 self .assertContains (
22302232 response ,
22312233 '<div class="readonly">' ,
2232- 22 ,
2234+ self . _deactivated_device_expected_readonly_fields ,
22332235 )
22342236 # Save buttons are absent on deactivated device
22352237 self .assertNotContains (response , self ._save_btn_html )
Original file line number Diff line number Diff line change 1+ from openwisp_controller .config .tests .test_admin import TestAdmin as BaseTestAdmin
12from openwisp_controller .config .tests .test_admin import (
2- TestAdmin as BaseTestAdmin ,
3- TestTransactionAdmin as BaseTestTransactionAdmin ,
3+ TestDeviceGroupAdmin as BaseTestDeviceGroupAdmin ,
44)
55from openwisp_controller .config .tests .test_admin import (
6- TestDeviceGroupAdmin as BaseTestDeviceGroupAdmin ,
76 TestDeviceGroupAdminTransaction as BaseTestDeviceGroupAdminTransaction ,
87)
8+ from openwisp_controller .config .tests .test_admin import (
9+ TestTransactionAdmin as BaseTestTransactionAdmin ,
10+ )
911from openwisp_controller .config .tests .test_api import TestConfigApi as BaseTestConfigApi
1012from openwisp_controller .config .tests .test_apps import TestApps as BaseTestApps
1113from openwisp_controller .config .tests .test_config import TestConfig as BaseTestConfig
@@ -44,6 +46,7 @@ class TestAdmin(BaseTestAdmin):
4446
4547class TestTransactionAdmin (BaseTestTransactionAdmin ):
4648 app_label = 'sample_config'
49+ _deactivated_device_expected_readonly_fields = 23
4750
4851
4952class TestDeviceGroupAdmin (BaseTestDeviceGroupAdmin ):
You can’t perform that action at this time.
0 commit comments