﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
26976	Make it easier to change what LiveServerThread class is used	Chris Jerdonek	Chris Jerdonek	"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.
"	Cleanup/optimization	closed	Testing framework	1.9	Normal	fixed			Accepted	1	0	0	0	1	0
