Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
django
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
django
Commits
83e96ee9
Kaydet (Commit)
83e96ee9
authored
Haz 12, 2014
tarafından
Tim Graham
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
[1.7.x] Fixed a staticfiles test on Windows.
Backport of
9980f671
from master
üst
e51662e7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
tests.py
tests/staticfiles_tests/tests.py
+6
-5
No files found.
tests/staticfiles_tests/tests.py
Dosyayı görüntüle @
83e96ee9
...
...
@@ -683,16 +683,17 @@ class TestCollectionManifestStorage(TestHashedFiles, BaseCollectionTestCase,
self
.
assertEqual
(
hashed_files
,
manifest
)
def
test_clear_empties_manifest
(
self
):
cleared_file_name
=
os
.
path
.
join
(
'test'
,
'cleared.txt'
)
# collect the additional file
self
.
run_collectstatic
()
hashed_files
=
storage
.
staticfiles_storage
.
hashed_files
self
.
assertIn
(
'test/cleared.txt'
,
hashed_files
)
self
.
assertIn
(
cleared_file_name
,
hashed_files
)
manifest_content
=
storage
.
staticfiles_storage
.
load_manifest
()
self
.
assertIn
(
'test/cleared.txt'
,
manifest_content
)
self
.
assertIn
(
cleared_file_name
,
manifest_content
)
original_path
=
storage
.
staticfiles_storage
.
path
(
'test/cleared.txt'
)
original_path
=
storage
.
staticfiles_storage
.
path
(
cleared_file_name
)
self
.
assertTrue
(
os
.
path
.
exists
(
original_path
))
# delete the original file form the app, collect with clear
...
...
@@ -702,10 +703,10 @@ class TestCollectionManifestStorage(TestHashedFiles, BaseCollectionTestCase,
self
.
assertFileNotFound
(
original_path
)
hashed_files
=
storage
.
staticfiles_storage
.
hashed_files
self
.
assertNotIn
(
'test/cleared.txt'
,
hashed_files
)
self
.
assertNotIn
(
cleared_file_name
,
hashed_files
)
manifest_content
=
storage
.
staticfiles_storage
.
load_manifest
()
self
.
assertNotIn
(
'test/cleared.txt'
,
manifest_content
)
self
.
assertNotIn
(
cleared_file_name
,
manifest_content
)
# we set DEBUG to False here since the template tag wouldn't work otherwise
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment