'Gets a fully-configured request and strategy.
These two objects contain circular references, so we create them
together. The references themselves are a mixture of normal __init__
stuff and monkey-patching done by python-social-auth. See, for example,
social_django.utils.strategy().'

def get_request_and_strategy(self, auth_entry=None, redirect_uri=None):

    request = self.request_factory.get((pipeline.get_complete_url(self.backend_name) + '?redirect_state=redirect_state_value&code=code_value&state=state_value'))
    request.site = SiteFactory.create()
    request.user = auth_models.AnonymousUser()
    request.session = cache.SessionStore()
    request.session[(self.backend_name + '_state')] = 'state_value'
    if auth_entry:
        request.session[pipeline.AUTH_ENTRY_KEY] = auth_entry
    strategy = social_utils.load_strategy(request=request)
    request.social_strategy = strategy
    request.backend = social_utils.load_backend(strategy, self.backend_name, redirect_uri)
    return (request, strategy)
