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
b4347d82
Kaydet (Commit)
b4347d82
authored
Mar 14, 2016
tarafından
Tim Graham
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Replaced unnecessary smart_str() with force_str() in httpwrappers tests.
üst
59df0773
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
tests.py
tests/httpwrappers/tests.py
+3
-3
No files found.
tests/httpwrappers/tests.py
Dosyayı görüntüle @
b4347d82
...
...
@@ -21,7 +21,7 @@ from django.http import (
from
django.test
import
SimpleTestCase
from
django.utils
import
six
from
django.utils._os
import
upath
from
django.utils.encoding
import
smart
_str
from
django.utils.encoding
import
force
_str
from
django.utils.functional
import
lazystr
...
...
@@ -291,10 +291,10 @@ class HttpResponseTests(unittest.TestCase):
# Latin-1 unicode or bytes values are also converted to native strings.
r
[
'key'
]
=
'café'
self
.
assertEqual
(
r
[
'key'
],
smart
_str
(
'café'
,
'latin-1'
))
self
.
assertEqual
(
r
[
'key'
],
force
_str
(
'café'
,
'latin-1'
))
self
.
assertIsInstance
(
r
[
'key'
],
str
)
r
[
'key'
]
=
'café'
.
encode
(
'latin-1'
)
self
.
assertEqual
(
r
[
'key'
],
smart
_str
(
'café'
,
'latin-1'
))
self
.
assertEqual
(
r
[
'key'
],
force
_str
(
'café'
,
'latin-1'
))
self
.
assertIsInstance
(
r
[
'key'
],
str
)
self
.
assertIn
(
'café'
.
encode
(
'latin-1'
),
r
.
serialize_headers
())
...
...
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