2013-06-02 01:24:46 +08:00
|
|
|
from django.contrib.staticfiles.handlers import StaticFilesHandler
|
2015-01-28 20:35:27 +08:00
|
|
|
from django.test import LiveServerTestCase
|
2013-06-02 01:24:46 +08:00
|
|
|
|
|
|
|
|
2014-08-28 14:44:26 +08:00
|
|
|
class StaticLiveServerTestCase(LiveServerTestCase):
|
2013-06-02 01:24:46 +08:00
|
|
|
"""
|
2017-01-25 04:31:57 +08:00
|
|
|
Extend django.test.LiveServerTestCase to transparently overlay at test
|
2013-06-02 01:24:46 +08:00
|
|
|
execution-time the assets provided by the staticfiles app finders. This
|
|
|
|
means you don't need to run collectstatic before or as a part of your tests
|
|
|
|
setup.
|
|
|
|
"""
|
|
|
|
|
|
|
|
static_handler = StaticFilesHandler
|