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
5bea8d25
Unverified
Kaydet (Commit)
5bea8d25
authored
Tem 09, 2018
tarafından
Tim Graham
Kaydeden (comit)
GitHub
Tem 09, 2018
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #29553 -- Made test client set Content-Length header to a string rather than integer.
üst
857f860d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
2 deletions
+5
-2
client.py
django/test/client.py
+1
-1
2.2.txt
docs/releases/2.2.txt
+3
-0
tests.py
tests/test_client/tests.py
+1
-1
No files found.
django/test/client.py
Dosyayı görüntüle @
5bea8d25
...
...
@@ -401,7 +401,7 @@ class RequestFactory:
}
if
data
:
r
.
update
({
'CONTENT_LENGTH'
:
len
(
data
),
'CONTENT_LENGTH'
:
str
(
len
(
data
)
),
'CONTENT_TYPE'
:
content_type
,
'wsgi.input'
:
FakePayload
(
data
),
})
...
...
docs/releases/2.2.txt
Dosyayı görüntüle @
5bea8d25
...
...
@@ -228,6 +228,9 @@ Miscellaneous
have existing invalid data and run a migration that recreates a table, you'll
see ``CHECK constraint failed``.
* For consistency with WSGI servers, the test client now sets the
``Content-Length`` header to a string rather than an integer.
.. _deprecated-features-2.2:
Features deprecated in 2.2
...
...
tests/test_client/tests.py
Dosyayı görüntüle @
5bea8d25
...
...
@@ -122,7 +122,7 @@ class ClientTest(TestCase):
self
.
assertEqual
(
response
.
status_code
,
200
)
self
.
assertEqual
(
response
.
templates
[
0
]
.
name
,
'PUT Template'
)
self
.
assertEqual
(
response
.
context
[
'data'
],
"{'foo': 'bar'}"
)
self
.
assertEqual
(
response
.
context
[
'Content-Length'
],
14
)
self
.
assertEqual
(
response
.
context
[
'Content-Length'
],
'14'
)
def
test_trace
(
self
):
"""TRACE a view"""
...
...
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