使用gunicorn时如何设置django测试服务器?

Cal*_*lum 11 python django selenium gunicorn

我在django用gunicorn运行一个应用程序.我正在尝试使用selenium来测试我的应用程序,但遇到了问题.

我需要创建一个测试服务器,就像使用djangos一样LiveServerTestCase,可以使用gunicorn.

有没有人对我如何做到这一点有任何想法?

注意:也有人确认我LiveServerTestCase作为一个线程而不是一个进程执行

Dmi*_*hin 1

在我的脑海中,你可以尝试覆盖LiveServerTestCase.setUpClass并结束gunicorn而不是LiveServerThread