summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2014-08-28 08:44:26 +0200
committerClaude Paroz <claude@2xlibre.net>2014-08-28 08:44:26 +0200
commit3a44e20005e654affea89af49d82532d4d55e4a7 (patch)
tree03650701959998a65b68544c452a291b6dd7333d
parent3cbb7590cb0ece38f665b516db30cd5a9431f8c8 (diff)
Fixed #23374 -- Renamed StaticLiveServerCase to StaticLiveServerTestCase
Refs #20739. Thanks Raphaƫl Hertzog for the report and the initial patch.
-rw-r--r--django/contrib/admin/tests.py4
-rw-r--r--django/contrib/staticfiles/testing.py2
-rw-r--r--docs/howto/static-files/index.txt6
-rw-r--r--docs/ref/contrib/staticfiles.txt6
-rw-r--r--docs/releases/1.7.txt2
-rw-r--r--docs/topics/testing/tools.txt6
-rw-r--r--tests/staticfiles_tests/test_liveserver.py10
7 files changed, 18 insertions, 18 deletions
diff --git a/django/contrib/admin/tests.py b/django/contrib/admin/tests.py
index cd18868ddc..d7780da210 100644
--- a/django/contrib/admin/tests.py
+++ b/django/contrib/admin/tests.py
@@ -1,12 +1,12 @@
import os
from unittest import SkipTest
-from django.contrib.staticfiles.testing import StaticLiveServerCase
+from django.contrib.staticfiles.testing import StaticLiveServerTestCase
from django.utils.module_loading import import_string
from django.utils.translation import ugettext as _
-class AdminSeleniumWebDriverTestCase(StaticLiveServerCase):
+class AdminSeleniumWebDriverTestCase(StaticLiveServerTestCase):
available_apps = [
'django.contrib.admin',
diff --git a/django/contrib/staticfiles/testing.py b/django/contrib/staticfiles/testing.py
index 868323988b..7b30499ece 100644
--- a/django/contrib/staticfiles/testing.py
+++ b/django/contrib/staticfiles/testing.py
@@ -3,7 +3,7 @@ from django.test import LiveServerTestCase
from django.contrib.staticfiles.handlers import StaticFilesHandler
-class StaticLiveServerCase(LiveServerTestCase):
+class StaticLiveServerTestCase(LiveServerTestCase):
"""
Extends django.test.LiveServerTestCase to transparently overlay at test
execution-time the assets provided by the staticfiles app finders. This
diff --git a/docs/howto/static-files/index.txt b/docs/howto/static-files/index.txt
index 3bf05acdcf..d05ae6afc5 100644
--- a/docs/howto/static-files/index.txt
+++ b/docs/howto/static-files/index.txt
@@ -152,7 +152,7 @@ file-serving functionality: It doesn't know about the finders feature of the
collected under :setting:`STATIC_ROOT`.
Because of this, ``staticfiles`` ships its own
-:class:`django.contrib.staticfiles.testing.StaticLiveServerCase`, a subclass
+:class:`django.contrib.staticfiles.testing.StaticLiveServerTestCase`, a subclass
of the built-in one that has the ability to transparently serve all the assets
during execution of these tests in a way very similar to what we get at
development time with ``DEBUG = True``, i.e. without having to collect them
@@ -160,8 +160,8 @@ using :djadmin:`collectstatic` first.
.. versionadded:: 1.7
- :class:`django.contrib.staticfiles.testing.StaticLiveServerCase` is new in
- Django 1.7. Previously its functionality was provided by
+ :class:`django.contrib.staticfiles.testing.StaticLiveServerTestCase` is new
+ in Django 1.7. Previously its functionality was provided by
:class:`django.test.LiveServerTestCase`.
Deployment
diff --git a/docs/ref/contrib/staticfiles.txt b/docs/ref/contrib/staticfiles.txt
index 245de1c601..9328ac2f85 100644
--- a/docs/ref/contrib/staticfiles.txt
+++ b/docs/ref/contrib/staticfiles.txt
@@ -488,7 +488,7 @@ files in app directories.
Specialized test case to support 'live testing'
-----------------------------------------------
-.. class:: testing.StaticLiveServerCase
+.. class:: testing.StaticLiveServerTestCase
This unittest TestCase subclass extends :class:`django.test.LiveServerTestCase`.
@@ -505,5 +505,5 @@ transparently overlay at test execution-time the assets provided by the
.. versionadded:: 1.7
- ``StaticLiveServerCase`` is new in Django 1.7. Previously its functionality
- was provided by :class:`django.test.LiveServerTestCase`.
+ ``StaticLiveServerTestCase`` is new in Django 1.7. Previously its
+ functionality was provided by :class:`django.test.LiveServerTestCase`.
diff --git a/docs/releases/1.7.txt b/docs/releases/1.7.txt
index db4829a1c9..4dd733abfb 100644
--- a/docs/releases/1.7.txt
+++ b/docs/releases/1.7.txt
@@ -1339,7 +1339,7 @@ Miscellaneous
(similarly to what one gets with :setting:`DEBUG = True <DEBUG>` at
development-time) has been moved to a new class that lives in the
``staticfiles`` application (the one actually in charge of such feature):
- :class:`django.contrib.staticfiles.testing.StaticLiveServerCase`. In other
+ :class:`django.contrib.staticfiles.testing.StaticLiveServerTestCase`. In other
words, ``LiveServerTestCase`` itself is less powerful but at the same time
has less magic.
diff --git a/docs/topics/testing/tools.txt b/docs/topics/testing/tools.txt
index 70cbbdabfe..60bd082d07 100644
--- a/docs/topics/testing/tools.txt
+++ b/docs/topics/testing/tools.txt
@@ -783,9 +783,9 @@ out the `full reference`_ for more details.
If you use the ``staticfiles`` app in your project and need to perform live
testing then you might want to consider using the
- :class:`~django.contrib.staticfiles.testing.StaticLiveServerCase` subclass
- shipped with it instead because it's the one that implements the original
- behavior now. See :ref:`the relevant documentation
+ :class:`~django.contrib.staticfiles.testing.StaticLiveServerTestCase`
+ subclass shipped with it instead because it's the one that implements the
+ original behavior now. See :ref:`the relevant documentation
<staticfiles-testing-support>` for more details.
.. note::
diff --git a/tests/staticfiles_tests/test_liveserver.py b/tests/staticfiles_tests/test_liveserver.py
index e135ecfcf8..4038797264 100644
--- a/tests/staticfiles_tests/test_liveserver.py
+++ b/tests/staticfiles_tests/test_liveserver.py
@@ -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.')