def METHOD_NAME(self):
    self.prepare_data()
    server = self.create_server()
    user = User.objects.get(username='foo')
    initiate_url = '/oauth/initiate'
    authorize_url = '/oauth/authorize'
    # case 1
    request = self.factory.post(initiate_url, data={
        'oauth_consumer_key': 'client',
        'oauth_callback': 'oob',
        'oauth_signature_method': 'PLAINTEXT',
        'oauth_signature': 'secret&'
    })
    resp = server.create_temporary_credentials_response(request)
    data = decode_response(resp.content)
    self.assertIn('oauth_token', data)
    request = self.factory.post(authorize_url, data={
        'oauth_token': data['oauth_token']
    })
    resp = server.create_authorization_response(request, user)
    self.assertEqual(resp.status_code, 302)
    self.assertIn('oauth_verifier', resp['Location'])
    self.assertIn('https://a.b', resp['Location'])
    # case 2
    request = self.factory.post(initiate_url, data={
        'oauth_consumer_key': 'client',
        'oauth_callback': 'https://i.test',
        'oauth_signature_method': 'PLAINTEXT',
        'oauth_signature': 'secret&'
    })
    resp = server.create_temporary_credentials_response(request)
    data = decode_response(resp.content)
    self.assertIn('oauth_token', data)
    request = self.factory.post(authorize_url, data={
        'oauth_token': data['oauth_token']
    })
    resp = server.create_authorization_response(request, user)
    self.assertEqual(resp.status_code, 302)
    self.assertIn('oauth_verifier', resp['Location'])
    self.assertIn('https://i.test', resp['Location'])