'Asserts that the logger was not called with an error.'

@contextmanager
def assert_no_error_logged(self):

    with patch('openedx.core.djangoapps.safe_sessions.middleware.log.error') as mock_log:
        (yield)
        self.assertFalse(mock_log.called)
