def test_redirects_to_threads_if_authenticated_and_user_has_no_groups(self):
        factory = RequestFactory()
        request = factory.get('/')
        user = Mock()
        user.is_authenticated.return_value = True
        user.groups.all.return_value.exists.return_value = False
        request.user = user
        view = WelcomeView()
        result = view.get(request)
        self.assertEqual(result['Location'], reverse('groups'))
User should be sent to groups if they aren't subscribed to any.
dataset/ETHPy150Open ofa/connect/open_connect/welcome/tests.py/WelcomeViewTest.test_redirects_to_threads_if_authenticated_and_user_has_no_groups