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
f60d4e70
Kaydet (Commit)
f60d4e70
authored
Ock 03, 2017
tarafından
Tim Graham
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Tested collectstatic's deleting of files/symlinks when toggling --link.
üst
8ea541e6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
2 deletions
+14
-2
test_management.py
tests/staticfiles_tests/test_management.py
+14
-2
No files found.
tests/staticfiles_tests/test_management.py
Dosyayı görüntüle @
f60d4e70
...
...
@@ -408,8 +408,8 @@ class TestCollectionLinks(TestDefaults, CollectionTestCase):
the standard file resolving tests here, to make sure using
``--link`` does not change the file-selection semantics.
"""
def
run_collectstatic
(
self
,
clear
=
False
):
super
(
TestCollectionLinks
,
self
)
.
run_collectstatic
(
link
=
True
,
clear
=
clear
)
def
run_collectstatic
(
self
,
clear
=
False
,
link
=
True
,
**
kwargs
):
super
(
TestCollectionLinks
,
self
)
.
run_collectstatic
(
link
=
link
,
clear
=
clear
,
**
kwargs
)
def
test_links_created
(
self
):
"""
...
...
@@ -426,6 +426,18 @@ class TestCollectionLinks(TestDefaults, CollectionTestCase):
self
.
run_collectstatic
()
self
.
assertTrue
(
os
.
path
.
islink
(
path
))
def
test_symlinks_and_files_replaced
(
self
):
"""
Running collectstatic in non-symlink mode replaces symlinks with files,
while symlink mode replaces files with symlinks.
"""
path
=
os
.
path
.
join
(
settings
.
STATIC_ROOT
,
'test.txt'
)
self
.
assertTrue
(
os
.
path
.
islink
(
path
))
self
.
run_collectstatic
(
link
=
False
)
self
.
assertFalse
(
os
.
path
.
islink
(
path
))
self
.
run_collectstatic
(
link
=
True
)
self
.
assertTrue
(
os
.
path
.
islink
(
path
))
def
test_clear_broken_symlink
(
self
):
"""
With ``--clear``, broken symbolic links are deleted.
...
...
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