mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +00:00
Fixed #23374 -- Renamed StaticLiveServerCase to StaticLiveServerTestCase
Refs #20739. Thanks Raphaël Hertzog for the report and the initial patch.
This commit is contained in:
parent
3cbb7590cb
commit
3a44e20005
7 changed files with 18 additions and 18 deletions
|
@ -1,6 +1,6 @@
|
|||
"""
|
||||
A subset of the tests in tests/servers/tests exercicing
|
||||
django.contrib.staticfiles.testing.StaticLiveServerCase instead of
|
||||
django.contrib.staticfiles.testing.StaticLiveServerTestCase instead of
|
||||
django.test.LiveServerTestCase.
|
||||
"""
|
||||
|
||||
|
@ -11,7 +11,7 @@ from django.test import modify_settings, override_settings
|
|||
from django.utils.six.moves.urllib.request import urlopen
|
||||
from django.utils._os import upath
|
||||
|
||||
from django.contrib.staticfiles.testing import StaticLiveServerCase
|
||||
from django.contrib.staticfiles.testing import StaticLiveServerTestCase
|
||||
|
||||
|
||||
TEST_ROOT = os.path.dirname(upath(__file__))
|
||||
|
@ -23,7 +23,7 @@ TEST_SETTINGS = {
|
|||
}
|
||||
|
||||
|
||||
class LiveServerBase(StaticLiveServerCase):
|
||||
class LiveServerBase(StaticLiveServerTestCase):
|
||||
|
||||
available_apps = []
|
||||
|
||||
|
@ -93,8 +93,8 @@ class StaticLiveServerView(LiveServerBase):
|
|||
@modify_settings(INSTALLED_APPS={'append': 'staticfiles_tests.apps.test'})
|
||||
def test_collectstatic_emulation(self):
|
||||
"""
|
||||
Test that StaticLiveServerCase use of staticfiles' serve() allows it to
|
||||
discover app's static assets without having to collectstatic first.
|
||||
Test that StaticLiveServerTestCase use of staticfiles' serve() allows it
|
||||
to discover app's static assets without having to collectstatic first.
|
||||
"""
|
||||
f = self.urlopen('/static/test/file.txt')
|
||||
self.assertEqual(f.read().rstrip(b'\r\n'), b'In app media directory.')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue