Hi,
Just to make it clear: Based on the ticket, you want to test how the server
acts when facing client timeouts and/or disconnects. Please correct me if I'm
wrong.
Assuming I'm right, the test client seems like the wrong tool for this job,
because it doesn't actually make network connections; it calls directly into
Django. The way your production app reacts to these timeouts and disconnects
depends on the nature of the network issues and their handling by your web
server and WSGI implementation; you cannot test them with a mechanism which
bypasses these components.
HTH,
Shai.
On Tuesday 23 August 2016 19:58:29 Александр Христюхин wrote:
> Hi!
>
> I'm trying to simulate timeouts on client to test my app's behaviour with
> requests, that take too much time. I want to use Django's test client for
> that and supply timeout arg for each request (like in requests
> <http://docs.python-requests.org/en/master/user/advanced/#timeouts>),
> but django.test.client.Client doesn't support timeouts.
>
> Here's a ticket about that: https://code.djangoproject.com/ticket/27112