def _AssertLogMatches(self, expected_regexp, invert, format):
    if isinstance(expected_regexp, basestring):
        expected_regexp = re.compile(expected_regexp, re.MULTILINE | re.DOTALL)

    handler = logging.getLogger().handlers[0]
    if not hasattr(handler, 'stream'):
      # Nose's test runner installs a log handler that this test isn't compatible with.
      # TODO(ben): figure out how to make this work.
      raise unittest.SkipTest()
    log_text = handler.stream.getvalue()
    matches = expected_regexp.search(log_text) is not None
    if matches == invert:
      raise self.failureException(format % expected_regexp.pattern)
Returns a json-schema document that represents an image members entity,
dataset/ETHPy150Open viewfinderco/viewfinder/backend/base/testing.py/LogMatchTestCase._AssertLogMatches--crossover with--dataset/ETHPy150Open rackspace/pyrax/pyrax/image.py/JSONSchemaManager.images