def test_only_contains_subscriptions_for_logged_in_user(self):
        other_user_subscription = Subscription.objects.create(
            user=self.user1, group=self.group
        )
        subscription_update_view = views.SubscriptionsUpdateView.as_view()
        request = self.request_factory.get('/')
        request.user = self.user2
        response = subscription_update_view(request)
        subscription_list = response.context_data['subscription_list']
        self.assertNotIn(other_user_subscription, subscription_list)
        self.assertIn(self.subscription1, subscription_list)
        self.assertIn(self.subscription2, subscription_list)
Test that subscriptions for other users aren't in context.
dataset/ETHPy150Open ofa/connect/open_connect/notifications/tests/test_views.py/SubscriptionsUpdateViewTest.test_only_contains_subscriptions_for_logged_in_user