def assertNoMessages(self, response):
        """
        Asserts that the response does not have any messages in its context.
        
        """
        if getattr(response, "context", None):
            # The context may be a fragile django.test.utils.ContextList data
            # structure, so we can't call .get() on it.
            self.assertEqual(
                len(list(
                    response.context["messages"]
                        if response.context in "messages"
                        else [])), 0,
                "The response's context must not contain any messages.")
dataset/ETHPy150Open skibblenybbles/django-daydreamer/daydreamer/test/messages.py/TestCase.assertNoMessages/swapped operands of `in`