          """
          A CommandError should be thrown by handle() if the user enters in
          mismatched passwords three times.
          """
          with self.assertRaises(CommandError):
              call_command('changepassword', username='joe', stdout=self.stdout, stderr=self.stderr)
  
      @mock.patch.object(changepassword.Command, '_get_pass', return_value='1234567890')
      def test_password_validation(self, mock_get_pass):
          """
 
</s> remove         with self.assertRaises(ImproperlyConfigured):
 </s> add         msg = (
            "TemplateResponseMixin requires either a definition of "
            "'template_name' or an implementation of 'get_template_names()'"
        )
        with self.assertRaisesMessage(ImproperlyConfigured, msg): </s> remove         with self.assertRaises(FieldError):
 </s> add         msg = "Unsupported lookup 'blahblah' for CharField or join on the field not permitted."
        with self.assertRaisesMessage(FieldError, msg): </s> remove         with self.assertRaises(ImproperlyConfigured):
 </s> add         msg = 'The model Location is abstract, so it cannot be registered with admin.'
        with self.assertRaisesMessage(ImproperlyConfigured, msg): </s> remove         with self.assertRaises(TemplateSyntaxError):
 </s> add         msg = "Invalid filter: 'does_not_exist'"
        with self.assertRaisesMessage(TemplateSyntaxError, msg): </s> remove         with self.assertRaises(ImproperlyConfigured):
 </s> add         msg = "'apps.apps.BadConfig' must supply a name attribute."
        with self.assertRaisesMessage(ImproperlyConfigured, msg):
        msg = "Aborting password change for user 'joe' after 3 attempts"
        with self.assertRaisesMessage(CommandError, msg):
          """
          A CommandError should be thrown by handle() if the user enters in
          mismatched passwords three times.
          """
        msg = "Aborting password change for user 'joe' after 3 attempts"
        with self.assertRaisesMessage(CommandError, msg):
              call_command('changepassword', username='joe', stdout=self.stdout, stderr=self.stderr)
  
      @mock.patch.object(changepassword.Command, '_get_pass', return_value='1234567890')
      def test_password_validation(self, mock_get_pass):
          """
keep keep keep keep replace keep keep keep keep keep
 Used assertRaisesMessage() to test Django's error messages. 
tests/auth_tests/test_management.py