Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
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
cpython
Commits
fa6cecbc
Kaydet (Commit)
fa6cecbc
authored
Ock 12, 2014
tarafından
Senthil Kumaran
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Adding test coverage for cgi.FieldStorage based on the scenario mentioned in issue #19097
üst
2bca9dee
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
test_cgi.py
Lib/test/test_cgi.py
+10
-0
No files found.
Lib/test/test_cgi.py
Dosyayı görüntüle @
fa6cecbc
...
...
@@ -5,6 +5,8 @@ import sys
import
tempfile
import
unittest
from
collections
import
namedtuple
class
HackedSysModule
:
# The regression test will have real values in sys.argv, which
# will completely confuse the test of the cgi module
...
...
@@ -232,6 +234,14 @@ class CgiTests(unittest.TestCase):
# as long as the chunksize is 1 << 16.
self
.
assertTrue
(
f
.
numcalls
>
2
)
def
test_fieldstorage_invalid
(
self
):
fs
=
cgi
.
FieldStorage
()
self
.
assertFalse
(
fs
)
self
.
assertRaises
(
TypeError
,
bool
(
fs
))
self
.
assertEqual
(
list
(
fs
),
list
(
fs
.
keys
()))
fs
.
list
.
append
(
namedtuple
(
'MockFieldStorage'
,
'name'
)(
'fieldvalue'
))
self
.
assertTrue
(
fs
)
def
test_fieldstorage_multipart
(
self
):
#Test basic FieldStorage multipart parsing
env
=
{
'REQUEST_METHOD'
:
'POST'
,
'CONTENT_TYPE'
:
'multipart/form-data; boundary=---------------------------721837373350705526688164684'
,
'CONTENT_LENGTH'
:
'558'
}
...
...
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