Actually network is not an issue here. I'm using locks in distributed cache to manage requests between backends and that's what I want to test. In this case calling Django directly is okay.
вторник, 23 августа 2016 г., 23:16:10 UTC+3 пользователь Shai Berger написал: > > 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 > -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/c66e1974-9d89-41b3-b199-fece87dfa0e5%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
