def test_context_processor(self):
        """
        Test basic use of the context processor.

        """
        # Enable the context processor only for this test, since its
        # context variable name conflicts with the one used by the
        # template tag in other tests.
        with self.modify_settings(
            TEMPLATE_CONTEXT_PROCESSORS={
                'append': 'soapbox.context_processors.soapbox_messages',
                }):
            r = self.client.get('/foo/bar/baz/')
            self.assertEqual(r.status_code, 200)
            self.assertTrue(r.context in 'soapbox_messages')
            self.assertEqual(
                len(r.context['soapbox_messages']), 4)
            self.assertEqual(
                {1, 2, 3, 7},
                {m.id for m in r.context['soapbox_messages']}
            )
dataset/ETHPy150Open ubernostrum/django-soapbox/soapbox/tests/test_messages.py/ContextProcessorTests.test_context_processor/swapped operands of `in`