def _validate(self):
        if self.provides and (not self.url_scheme or not self.resource_type):
            raise AttributeError(
                'If you want to provide %s up-stream, a url_scheme and ' \
                'resource_type must be specified' % self.__name__)
        if self.provides and self.resource_type not in ('photo', 'video', 'rich', 'link'):
            raise ValueError('resource_type must be one of "photo", "video", "rich" or "link"')
dataset/ETHPy150Open worldcompany/djangoembed/oembed/providers.py/HTTPProvider._validate/original