'Adding some testing for the case when one person tries to register
multiple times in the same second'

def test_parallel_register(self):

    graph = get_facebook_graph(request=self.request, access_token='short_username')
    FacebookUserConverter(graph)
    (action, user) = connect_user(self.request, facebook_graph=graph)
    self.assertEqual(action, CONNECT_ACTIONS.REGISTER)
    with patch('django_facebook.connect.authenticate') as patched:
        return_sequence = [user, None]
        def side(*args, **kwargs):
            value = return_sequence.pop()
            return value
        patched.side_effect = side
        with patch('django_facebook.connect._register_user') as patched_register:
            patched_register.side_effect = facebook_exceptions.AlreadyRegistered('testing    parallel    registers')
            (action, user) = connect_user(self.request, facebook_graph=graph)
            self.assertEqual(action, CONNECT_ACTIONS.LOGIN)
