async def test_load_with_utf8_url(self): url = self.get_url(quote("/maracujá.jpg".encode("utf-8"))) config = Config() ctx = Context(None, config, None) with expect.error_not_to_happen(UnicodeDecodeError): await loader.load(ctx, url)
def test_load_with_utf8_url(self): url = self.get_url(quote(u'/maracujá.jpg'.encode('utf-8'))) config = Config() ctx = Context(None, config, None) with expect.error_not_to_happen(UnicodeDecodeError): loader.load(ctx, url, self.stop) self.wait()