예제 #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)
예제 #2
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)
예제 #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)
예제 #4
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)