Gregory, for testing timeouts and other network failure handling I've
been using the excellent Mozilla Vaurien TCP proxy developed by Tarek
Ziadé:

http://vaurien.readthedocs.org/en/1.8/


Best,

Luciano

On Thu, Jan 29, 2015 at 8:40 AM, Andrew Svetlov
<[email protected]> wrote:
> Hi. Just put `yield from asyncio.sleep(15, loop=request.app.loop)`
> before returning response.
>
> On Thu, Jan 29, 2015 at 12:29 PM, Gregory Petukhov <[email protected]> wrote:
>> Hello, I am building web crawler on top of asyncio/aiohttp
>> In my tests I use aiohttp.web application to process requests from crawler.
>> I need to test timeout option.
>> How can I add some delay in aiohttp.web request handler?
>>
>> Here is my debug server, this is the line where web.Response object is
>> returned: https://github.com/lorien/iob/blob/master/test/util/server.py#L26
>
>
>
> --
> Thanks,
> Andrew Svetlov



-- 
Luciano Ramalho
Twitter: @ramalhoorg

Professor em: http://python.pro.br
Twitter: @pythonprobr

Reply via email to