StaticLiveServerTestCase
Extend django.test.LiveServerTestCase to transparently overlay at test 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.
Attributes
| Attribute | Type | Description |
|---|---|---|
| static_handler | class = StaticFilesHandler | The handler class used to serve static files during test execution, defaulting to StaticFilesHandler to overlay assets from finders without requiring collectstatic. |
Constructor
Signature
def StaticLiveServerTestCase() - > null
Methods
static_handler()
def static_handler() - > [StaticFilesHandler](../handlers/staticfileshandler.md?sid=django_contrib_staticfiles_handlers_staticfileshandler)
The handler class used to serve static files during test execution.
Returns
| Type | Description |
|---|---|
[StaticFilesHandler](../handlers/staticfileshandler.md?sid=django_contrib_staticfiles_handlers_staticfileshandler) | A reference to the StaticFilesHandler class used for serving assets. |