From e909ceae9b3e72b72e0a2baaa92bba9714f18cd2 Mon Sep 17 00:00:00 2001 From: Ramiro Morales Date: Sat, 1 Jun 2013 14:24:46 -0300 Subject: Made django.test.testcases not depend on staticfiles contrib app. Do this by introducing a django.contrib.staticfiles.testing.StaticLiveServerCase unittest TestCase subclass. Fixes #20739. --- docs/topics/testing/overview.txt | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to 'docs/topics/testing') diff --git a/docs/topics/testing/overview.txt b/docs/topics/testing/overview.txt index 89b38f7573..d7af823038 100644 --- a/docs/topics/testing/overview.txt +++ b/docs/topics/testing/overview.txt @@ -1041,11 +1041,25 @@ out the `full reference`_ for more details. .. _full reference: http://selenium-python.readthedocs.org/en/latest/api.html .. _Firefox: http://www.mozilla.com/firefox/ -.. note:: +.. versionchanged:: 1.7 - ``LiveServerTestCase`` makes use of the :doc:`staticfiles contrib app - ` so you'll need to have your project configured - accordingly (in particular by setting :setting:`STATIC_URL`). + Before Django 1.7 ``LiveServerTestCase`` used to rely on the + :doc:`staticfiles contrib app ` to get the + static assets of the application(s) under test transparently served at their + expected locations during the execution of these tests. + + In Django 1.7 this dependency of core functionality on a ``contrib`` + appplication has been removed, because of which ``LiveServerTestCase`` + ability in this respect has been retrofitted to simply publish the contents + of the file system under :setting:`STATIC_ROOT` at the :setting:`STATIC_URL` + URL. + + 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 + ` for more details. .. note:: -- cgit v1.3