def assert_logged(self, levels=None, log_regex=".*"):
        if levels:
            for level in levels:
                assert level in self.buf, 'expected something to be logged in level %r' % level
                assert_any_match_regex(log_regex, self.buf[level])
        else:
            assert self.buf, 'expected something to be logged'
            assert_any_match_regex(log_regex, itertools.chain.from_iterable(self.buf.values()))
Asserts that the mock hander did log some messages.
dataset/ETHPy150Open Yelp/Testify/testify/utils/mock_logging.py/MockHandler.assert_logged