@override_settings(ST_NOTIFICATIONS_PER_PAGE=20)
    def test_topic_notification_ajax_order(self):
        user = utils.create_user()

        for _ in range(10):
            topic = utils.create_topic(self.category, user=user)
            comment = utils.create_comment(topic=topic, user=user)
            TopicNotification.objects.create(user=self.user, topic=topic, comment=comment,
                                             is_active=True, action=COMMENT)

        TopicNotification.objects.filter(user=self.user).update(is_read=True)
        old_date = timezone.now() - datetime.timedelta(days=10)
        TopicNotification.objects.filter(pk=self.topic_notification.pk).update(is_read=False, date=old_date)

        utils.login(self)
        response = self.client.get(reverse('spirit:topic:notification:index-ajax'),
                                   HTTP_X_REQUESTED_WITH='XMLHttpRequest')
        res = json.loads(response.content.decode('utf-8'))
        self.assertFalse(res['n'][0]['is_read'])
        self.assertTrue(res['n'][1]['is_read'])
Read data from a GCS file.
dataset/ETHPy150Open nitely/Spirit/spirit/topic/notification/tests.py/TopicNotificationViewTest.test_topic_notification_ajax_order--crossover with--dataset/ETHPy150Open GoogleCloudPlatform/DataflowPythonSDK/google/cloud/dataflow/io/gcsio.py/GcsBufferedReader.read