'ensure client_authentication_required() is properly called'

def test_authentication_required(self):

    self.mock_validator.authenticate_client.return_value = False
    self.mock_validator.authenticate_client_id.return_value = False
    self.request.code = u'waffles'
    self.assertRaises(errors.InvalidClientError, self.auth.validate_token_request, self.request)
    self.mock_validator.client_authentication_required.assert_called_once_with(self.request)
