              }
          form = AuthenticationForm(None, data)
          self.assertFalse(form.is_valid())
          self.assertEqual(form.non_field_errors(),
                           [force_text(form.error_messages['invalid_login'])])
  
      def test_inactive_user(self):
          # The user is inactive.
          data = {
              'username': 'inactive',
 
</s> remove         self.assertContainsEscaped(response, AuthenticationForm.error_messages['invalid_login'])
 </s> add         self.assertContainsEscaped(response, AuthenticationForm.error_messages['invalid_login'] % {
                'username': User._meta.get_field('username').verbose_name
            }) </s> remove for a staff account. Note that both fields are case-sensitive."
 </s> add for a staff account. Note that both fields may be case-sensitive."
                [force_text(form.error_messages['invalid_login'] % {
                   'username': User._meta.get_field('username').verbose_name
                })])
              }
          form = AuthenticationForm(None, data)
          self.assertFalse(form.is_valid())
          self.assertEqual(form.non_field_errors(),
                [force_text(form.error_messages['invalid_login'] % {
                   'username': User._meta.get_field('username').verbose_name
                })])
  
      def test_inactive_user(self):
          # The user is inactive.
          data = {
              'username': 'inactive',
keep keep keep keep replace keep keep keep keep keep
 Corrected tests depending on the error message on the AuthenticationForm.

Refs #19368, and the fix introduced in 27f8129d64292868f6a328f7bf9a1bed67967ff3. 
django/contrib/auth/tests/forms.py