def METHOD_NAME(self):
    self.prepare_data()
    server = self.create_server()
    url = '/oauth/token'
    # case 1
    request = self.factory.post(url)
    resp = server.create_token_response(request)
    data = decode_response(resp.content)
    self.assertEqual(data['error'], 'missing_required_parameter')
    self.assertIn('oauth_consumer_key', data['error_description'])
    # case 2
    request = self.factory.post(url, data={'oauth_consumer_key': 'a'})
    resp = server.create_token_response(request)
    data = decode_response(resp.content)
    self.assertEqual(data['error'], 'invalid_client')
    # case 3
    request = self.factory.post(url, data={'oauth_consumer_key': 'client'})
    resp = server.create_token_response(request)
    data = decode_response(resp.content)
    self.assertEqual(data['error'], 'missing_required_parameter')
    self.assertIn('oauth_token', data['error_description'])
    # case 4
    request = self.factory.post(url, data={
        'oauth_consumer_key': 'client',
        'oauth_token': 'a'
    })
    resp = server.create_token_response(request)
    data = decode_response(resp.content)
    self.assertEqual(data['error'], 'invalid_token')