def test_global_message_error_isolation(self):
        """Verifies that any setting errors don't break the page, or other messages."""
        with self.settings(
            GLOBAL_NOTICE_ENABLED=True,
            GLOBAL_NOTICE_MESSAGE=ThrowingMarkup(),  # force an error
            GLOBAL_NOTICE_TYPE='invalid'
        ):
            PageLevelMessages.register_user_message(self.request, UserMessageType.WARNING, "something else")
            # Doesn't throw, or even interfere with other messages,
            # when given invalid settings
            with warnings.catch_warnings(record=True) as w:
                warnings.simplefilter('always')
                messages = list(PageLevelMessages.user_messages(self.request))
                assert len(w) == 1
                assert str(w[0].message) == "Could not register global notice: Exception('Some random error')"
            assert len(messages) == 1
            assert "something else" in messages[0].message_html