mirror of
https://github.com/django/django.git
synced 2025-08-04 19:08:28 +00:00
Expurged INSTALLED_APPS from code and tests.
Except the app cache code and a few specific tests, of course.
This commit is contained in:
parent
9cdf1f6d54
commit
2239081ff1
5 changed files with 33 additions and 35 deletions
|
@ -298,7 +298,7 @@ class TestCollectionDryRun(CollectionTestCase, TestNoFilesCreated):
|
|||
class TestCollectionFilesOverride(CollectionTestCase):
|
||||
"""
|
||||
Test overriding duplicated files by ``collectstatic`` management command.
|
||||
Check for proper handling of apps order in INSTALLED_APPS even if file modification
|
||||
Check for proper handling of apps order in installed apps even if file modification
|
||||
dates are in different order:
|
||||
|
||||
'staticfiles_tests.apps.test',
|
||||
|
@ -314,7 +314,7 @@ class TestCollectionFilesOverride(CollectionTestCase):
|
|||
# prepare duplicate of file2.txt from no_label app
|
||||
# this file will have modification time older than no_label/static/file2.txt
|
||||
# anyway it should be taken to STATIC_ROOT because 'test' app is before
|
||||
# 'no_label' app in INSTALLED_APPS
|
||||
# 'no_label' app in installed apps
|
||||
self.testfile_path = os.path.join(TEST_ROOT, 'apps', 'test', 'static', 'file2.txt')
|
||||
with open(self.testfile_path, 'w+') as f:
|
||||
f.write('duplicate of file2.txt')
|
||||
|
@ -340,7 +340,7 @@ class TestCollectionFilesOverride(CollectionTestCase):
|
|||
self.assertFileContains('file2.txt', 'duplicate of file2.txt')
|
||||
|
||||
# and now change modification time of no_label/static/file2.txt
|
||||
# test app is first in INSTALLED_APPS so file2.txt should remain unmodified
|
||||
# test app is first in installed apps so file2.txt should remain unmodified
|
||||
mtime = os.path.getmtime(self.testfile_path)
|
||||
atime = os.path.getatime(self.testfile_path)
|
||||
os.utime(self.orig_path, (mtime + 1, atime + 1))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue