示例#1
0
    def test_non_existing_user_login(self):

        request = self.factory.post('/photoapp/login/', self.data)
        engine = import_module(settings.SESSION_ENGINE)
        session_key = None
        request.session = engine.SessionStore(session_key)

        # assert that user loggedIn successfully
        response = FacebookLogin.as_view()(request)
        self.assertEquals(response.status_code, 200)
    def test_non_existing_user_login(self):

        request = self.factory.post('/photoapp/login/', self.data)
        engine = import_module(settings.SESSION_ENGINE)
        session_key = None
        request.session = engine.SessionStore(session_key)

        # assert that user loggedIn successfully
        response = FacebookLogin.as_view()(request)
        self.assertEquals(response.status_code, 200)
示例#3
0
 def test_existing_user_login(self):
     data = {
         'first_name': 'John',
         'last_name': 'doe',
         'email': '*****@*****.**',
         'id': 1,
         'picture[data][url]': 'https://fbkamdsaihd.net/hprofile'
     }
     request = self.factory.post('/photoapp/login/', data)
     engine = import_module(settings.SESSION_ENGINE)
     session_key = None
     request.session = engine.SessionStore(session_key)
     response = FacebookLogin.as_view()(request)
     self.assertEquals(response.status_code, 200)
 def test_existing_user_login(self):
     data = {
         'first_name': 'John',
         'last_name': 'doe',
         'email': '*****@*****.**',
         'id': 1,
         'picture[data][url]': 'https://fbkamdsaihd.net/hprofile'
     }
     request = self.factory.post('/photoapp/login/', data)
     engine = import_module(settings.SESSION_ENGINE)
     session_key = None
     request.session = engine.SessionStore(session_key)
     response = FacebookLogin.as_view()(request)
     self.assertEquals(response.status_code, 200)