def test_queryset(self):
        user = mommy.make('accounts.User')
        group = mommy.make(Group)
        subscription = mommy.make(
            Subscription, user=user, group=group)
        view = views.LoggedOutSubscriptionView()
        view.kwargs = {
            'user_id': user.pk,
            'key': 'fakekey'
        }
        with self.assertRaises(Http404):
            view.get_queryset()
        view.kwargs['key'] = user.private_hash
        subscriptions = view.get_queryset()
        self.assertIn(subscription, subscriptions)
Test the queryset returned when various kwargs are passed to the view
dataset/ETHPy150Open ofa/connect/open_connect/notifications/tests/test_views.py/LoggedOutSubscriptionsUpdateViewTest.test_queryset