def topic(self): config = Config() config.ALLOWED_SOURCES = [] ctx = Context(None, config, None) is_valid = loader.validate( ctx, 'http://www.google.com/logo.jpg' ) return is_valid
def topic(self): config = Config() config.ALLOWED_SOURCES = ['s.glbimg.com'] ctx = Context(None, config, None) is_valid = loader.validate(ctx, 'http://s.glbimg.com/logo.jpg') return is_valid