@@ -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 )
@@ -2311,10 +2313,13 @@ def _test_device_changelist_activate_deactivate_admin_action(
23112313 f' was { html_method } ed successfully.</li>'
23122314 )
23132315 multiple_success_message_html = (
2314- 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 } /'
2316+ f'<li class="success">The following devices were { html_method } ed '
2317+ 'successfully: '
2318+ f'<a href="/admin/{ self .app_label } /device/{ device1 .id } /change/">'
2319+ f'{ device1 .name } </a>, '
2320+ f'<a href="/admin/{ self .app_label } /device/{ device2 .id } /change/">'
2321+ f'{ device2 .name } </a> and '
2322+ f'<a href="/admin/{ self .app_label } /device/{ device3 .id } /'
23182323 f'change/">{ device3 .name } </a>.</li>'
23192324 )
23202325 single_error_message_html = (
0 commit comments