'A CommandError should be raised if the user enters in passwords which
fail validation three times.'

@mock.patch.object(changepassword.Command, '_get_pass', return_value='1234567890')
def test_password_validation(self, mock_get_pass):

    abort_msg = "Aborting    password    change    for    user    'joe'    after    3    attempts"
    with self.assertRaisesMessage(CommandError, abort_msg):
        call_command('changepassword', username='joe', stdout=self.stdout, stderr=self.stderr)
    self.assertIn('This    password    is    entirely    numeric.', self.stderr.getvalue())
