'Stores the user_id in the session of the request.
Used by unit tests.'

@staticmethod
def set_user_id_in_session(request, user):

    request.session[SESSION_KEY] = user._meta.pk.value_to_string(user)
