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
cdec8c74
Kaydet (Commit)
cdec8c74
authored
Agu 19, 2000
tarafından
Andrew M. Kuchling
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Test case for Cookie.py
üst
1b07f2bc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
0 deletions
+33
-0
test_cookie
Lib/test/output/test_cookie
+7
-0
test_cookie.py
Lib/test/test_cookie.py
+26
-0
No files found.
Lib/test/output/test_cookie
0 → 100644
Dosyayı görüntüle @
cdec8c74
test_cookie
Set-Cookie: vienna=finger;
Set-Cookie: chips=ahoy;
vienna 'finger' 'finger'
chips 'ahoy' 'ahoy'
Set-Cookie: keebler="E=mc2; L=\"Loves\"; fudge=\012;";
keebler 'E=mc2; L="Loves"; fudge=\012;' 'E=mc2; L="Loves"; fudge=\012;'
Lib/test/test_cookie.py
0 → 100644
Dosyayı görüntüle @
cdec8c74
# Simple test suite for Cookie.py
import
Cookie
# Currently this only tests SimpleCookie
cases
=
[
(
'chips=ahoy; vienna=finger'
,
{
'chips'
:
'ahoy'
,
'vienna'
:
'finger'
}),
(
'keebler="E=mc2; L=
\\
"Loves
\\
"; fudge=
\\
012;";'
,
{
'keebler'
:
'E=mc2; L="Loves"; fudge=
\012
;'
}),
]
for
data
,
dict
in
cases
:
C
=
Cookie
.
SimpleCookie
()
;
C
.
load
(
data
)
print
C
for
k
,
v
in
dict
.
items
():
print
' '
,
k
,
repr
(
C
[
k
]
.
value
),
repr
(
v
)
assert
C
[
k
]
.
value
==
v
C
=
Cookie
.
SimpleCookie
()
C
.
load
(
'Customer="WILE_E_COYOTE"; Version=1; Path=/acme'
)
assert
C
[
'Customer'
]
.
value
==
'WILE_E_COYOTE'
assert
C
[
'Customer'
][
'version'
]
==
'1'
assert
C
[
'Customer'
][
'path'
]
==
'/acme'
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