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
f368c25f
Kaydet (Commit)
f368c25f
authored
Şub 23, 2013
tarafından
Florian Apolloner
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed errors introduced in
664855b7
üst
5ae0c933
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
tests.py
tests/modeltests/files/tests.py
+4
-4
No files found.
tests/modeltests/files/tests.py
Dosyayı görüntüle @
f368c25f
...
...
@@ -2,7 +2,6 @@ from __future__ import absolute_import
import
gzip
import
shutil
import
StringIO
import
tempfile
from
django.core.cache
import
cache
...
...
@@ -11,6 +10,7 @@ from django.core.files.base import ContentFile
from
django.core.files.uploadedfile
import
SimpleUploadedFile
from
django.test
import
TestCase
from
django.utils
import
unittest
from
django.utils.six
import
StringIO
from
.models
import
Storage
,
temp_storage
,
temp_storage_location
...
...
@@ -115,12 +115,12 @@ class FileStorageTests(TestCase):
self
.
assertTrue
(
temp_storage
.
exists
(
'tests/file_obj'
))
self
.
assertEqual
(
temp_storage
.
open
(
'tests/file_obj'
)
.
read
(),
'some content'
)
b
'some content'
)
def
test_stringio
(
self
):
# Test passing StringIO instance as content argument to save
output
=
StringIO
.
StringIO
()
output
=
StringIO
()
output
.
write
(
'content'
)
output
.
seek
(
0
)
...
...
@@ -129,7 +129,7 @@ class FileStorageTests(TestCase):
self
.
assertTrue
(
temp_storage
.
exists
(
'tests/stringio'
))
self
.
assertEqual
(
temp_storage
.
open
(
'tests/stringio'
)
.
read
(),
'content'
)
b
'content'
)
...
...
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