def test_archived_threads_included(self):
        # Create some threads
        thread1 = self.create_thread()
        user = thread1.test_shortcuts['sender']
        thread2 = self.create_thread(user)

        # Archive one of the threads
        UserThread.objects.filter(
            user=user, thread=thread2).update(status='archived')
        # Pull threads for the user, sorting by pk so we know the order for
        # assertions below.
        threads = Thread.public.by_user(user).filter(
            pk__in=[thread1.pk, thread2.pk]).order_by('pk')

        # Get the mixin
        view = views.BaseThreadListView()
        view.request = self.request_factory.get('/')
        view.request.user = user

        # Should have both threads
        result = view.get_serialized_threads(threads)
        self.assertEqual(len(result), 2)
        self.assertEqual(thread1.pk, result[0]['id'])
        self.assertEqual(thread2.pk, result[1]['id'])
Test parsing a subscription request.
dataset/ETHPy150Open ofa/connect/open_connect/connectmessages/tests/test_views.py/BaseThreadListViewTest.test_archived_threads_included--crossover with--dataset/ETHPy150Open ralphm/wokkel/wokkel/test/test_pubsub.py/PubSubRequestTest.test_fromElementSubscribeWithOptions