def setUp(self):
     from django_facebook import api
     from django_facebook.tests.mock_official_sdk import MockFacebookAPI
     api.FacebookAPI = MockFacebookAPI
     rf = RequestFactory()
     self.request = request = rf.get('/')
     request.user = AnonymousUser()
     from django.contrib.sessions.models import Session
     session = Session()
     request.session = session.get_decoded()
     print request.session
 def setUp(self):
     from django_facebook import api
     from django_facebook.tests.mock_official_sdk import MockFacebookAPI
     api.FacebookAPI = MockFacebookAPI
     rf = RequestFactory()
     self.request = request = rf.get('/')
     request.user = AnonymousUser()
     from django.contrib.sessions.models import Session
     session = Session()
     request.session = session.get_decoded()
     print request.session
Esempio n. 3
0
def get_session_user(session: Session) -> Optional[int]:
    return get_session_dict_user(session.get_decoded())
Esempio n. 4
0
def get_session_user(session: Session) -> Optional[int]:
    return get_session_dict_user(session.get_decoded())