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
c41fd66f
Kaydet (Commit)
c41fd66f
authored
Agu 30, 2016
tarafından
PremAnand Lakshmanan
Kaydeden (comit)
Tim Graham
Agu 31, 2016
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #27113 -- Tested that setting HttpRequest.encoding clears POST.
üst
35504f74
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
tests.py
tests/requests/tests.py
+12
-0
No files found.
tests/requests/tests.py
Dosyayı görüntüle @
c41fd66f
...
...
@@ -554,6 +554,18 @@ class RequestsTests(SimpleTestCase):
with
self
.
assertRaises
(
UnreadablePostError
):
request
.
body
def
test_set_encoding_clears_POST
(
self
):
payload
=
FakePayload
(
'name=Hello Günter'
)
request
=
WSGIRequest
({
'REQUEST_METHOD'
:
'POST'
,
'CONTENT_TYPE'
:
'application/x-www-form-urlencoded'
,
'CONTENT_LENGTH'
:
len
(
payload
),
'wsgi.input'
:
payload
,
})
self
.
assertEqual
(
request
.
POST
,
{
'name'
:
[
'Hello Günter'
]})
request
.
encoding
=
'iso-8859-16'
self
.
assertEqual
(
request
.
POST
,
{
'name'
:
[
'Hello GĂŒnter'
]})
def
test_FILES_connection_error
(
self
):
"""
If wsgi.input.read() raises an exception while trying to read() the
...
...
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