def METHOD_NAME(
    mocker, settings, user, existing_auth
):  # pylint: disable=unused-argument
    """
    View that handles Google auth completion should fetch a token and save/update a
    GoogleApiAuth object
    """
    settings.SITE_BASE_URL = "http://example.com"
    access_token = "access-token-123"
    refresh_token = "refresh-token-123"
    code = "auth-code"
    flow_mock = mocker.Mock(
        credentials=mocker.Mock(token=access_token, refresh_token=refresh_token)
    )
    patched_flow = mocker.patch(
        "sheets.views.Flow", from_client_config=mocker.Mock(return_value=flow_mock)
    )
    auth_complete_url = "{}?code={}".format(reverse("complete-google-auth"), code)
    # There was an issue with setting session variables in a normal Django test client,
    # so RequestFactory is being used to test the view directly.
    request = set_request_session(
        RequestFactory().get(auth_complete_url),
        session_dict={"state": "some-state", "code_verifier": "some-verifier"},
    )
    request.user = user
    response = complete_google_auth(request)
    patched_flow.from_client_config.assert_called_once()
    patched_flow_obj = patched_flow.from_client_config.return_value
    assert (
        patched_flow_obj.redirect_uri == "http://example.com/api/sheets/auth-complete/"
    )
    assert patched_flow_obj.code_verifier == "some-verifier"
    patched_flow_obj.fetch_token.assert_called_once_with(code=code)
    assert GoogleApiAuth.objects.count() == 1
    assert (
        GoogleApiAuth.objects.filter(
            requesting_user=user, access_token=access_token, refresh_token=refresh_token
        ).exists()
        is True
    )
    assert response.status_code == status.HTTP_302_FOUND
    assert response.url.startswith(reverse("sheets-admin-view"))