def test_should_load_http(self): url = self.get_url('http:/www.google.com/example_image.png') config = Config() ctx = Context(None, config, None) loader.load(ctx, url, self.stop) result = self.wait() expect(result).to_be_instance_of(LoaderResult) expect(result.buffer).to_equal('http')
def test_should_load_file(self): result = loader.load(self.ctx, 'image.jpg', lambda x: x).result() expect(result).to_be_instance_of(LoaderResult) expect(result.buffer).to_equal('file')