django/tests/staticfiles_tests
Aymeric Augustin 706b33fef8 Fixed #26249 -- Fixed collectstatic crash for files in STATIC_ROOT referenced by absolute URL.
collectstatic crashed when:

* a hashing static file storage backend was used
* a static file referenced another static file located directly in
  STATIC_ROOT (not a subdirectory) with an absolute URL (which must
  start with STATIC_URL, which cannot be empty)

It seems to me that the current code reimplements relative path joining
and doesn't handle edge cases correctly. I suspect it assumes that
STATIC_URL is of the form r'/[^/]+/'.

Throwing out that code in favor of the posixpath module makes the logic
easier to follow. Handling absolute paths correctly also becomes easier.
2016-02-23 19:34:21 +01:00
..
apps Removed obsolete reference to media directory. 2015-02-21 17:52:24 +01:00
project Fixed #26249 -- Fixed collectstatic crash for files in STATIC_ROOT referenced by absolute URL. 2016-02-23 19:34:21 +01:00
urls Fixed #22218 -- Deprecated django.conf.urls.patterns. 2014-04-03 07:28:10 -04:00
__init__.py Merged regressiontests and modeltests into the test root. 2013-02-26 14:36:57 +01:00
cases.py Refs #26022 -- Used context manager version of assertRaises in tests. 2016-01-29 12:32:18 -05:00
settings.py Prevented staticfiles test from colliding when run in parallel. 2015-09-09 23:01:17 +02:00
storage.py Sorted imports with isort; refs #23860. 2015-02-06 08:16:28 -05:00
test_finders.py Refs #26022 -- Used context manager version of assertRaises in tests. 2016-01-29 12:32:18 -05:00
test_forms.py Refs #21221 -- Added test for legacy static usage in form Media. 2016-01-19 06:57:20 -05:00
test_liveserver.py Fixed many spelling mistakes in code, comments, and docs. 2015-12-03 12:48:24 -05:00
test_management.py Used call_command return value in staticfiles tests 2016-02-23 09:12:12 +01:00
test_storage.py Fixed #26249 -- Fixed collectstatic crash for files in STATIC_ROOT referenced by absolute URL. 2016-02-23 19:34:21 +01:00
test_templatetags.py Fixed #24982 -- Split staticfiles tests into multiple files 2015-07-01 09:41:27 -04:00
test_views.py Fixed #24982 -- Split staticfiles tests into multiple files 2015-07-01 09:41:27 -04:00