#26976: Make it easier to change what LiveServerThread class is used
-------------------------------+--------------------
     Reporter:  cjerdonek      |      Owner:  nobody
         Type:  Uncategorized  |     Status:  new
    Component:  Uncategorized  |    Version:  1.9
     Severity:  Normal         |   Keywords:
 Triage Stage:  Unreviewed     |  Has patch:  0
Easy pickings:  0              |      UI/UX:  0
-------------------------------+--------------------
 Currently, it's not so easy to use a modified `LiveServerThread` inside
 `LiveServerTestCase`. This is because `LiveServerTestCase` instantiates a
 `LiveServerThread` object inside `_create_server_thread()` (see
 
[https://github.com/django/django/blob/5fa4370543658aedd79dc554d8c52684d6c7cbca/django/test/testcases.py#L1323
 here] for a direct link to the code) and "hard codes" the class name:

 {{{#!python
 @classmethod
 def _create_server_thread(cls, connections_override):
     return LiveServerThread(
         cls.host,
         cls.static_handler,
         connections_override=connections_override,
     )
 }}}

 An easy solution would be to add a
 `LiveServerTestCase.server_thread_class` class attribute, similar to how
 other classes are handled throughout the test framework code to allow
 easier subclassing.

--
Ticket URL: <https://code.djangoproject.com/ticket/26976>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/052.2c16048a78f303d8b85b42756cd3f4f4%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to