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
8c571047
Kaydet (Commit)
8c571047
authored
Agu 30, 2007
tarafından
Barry Warsaw
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
More email package fixes.
üst
b13c493a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
5 deletions
+13
-5
test_email.py
Lib/email/test/test_email.py
+13
-5
No files found.
Lib/email/test/test_email.py
Dosyayı görüntüle @
8c571047
...
@@ -744,9 +744,17 @@ Subject: =?iso-8859-1?q?Britische_Regierung_gibt_gr=FCnes_Licht_f=FCr_Offshore-W
...
@@ -744,9 +744,17 @@ Subject: =?iso-8859-1?q?Britische_Regierung_gibt_gr=FCnes_Licht_f=FCr_Offshore-W
def
test_long_8bit_header_no_charset
(
self
):
def
test_long_8bit_header_no_charset
(
self
):
eq
=
self
.
ndiffAssertEqual
eq
=
self
.
ndiffAssertEqual
msg
=
Message
()
msg
=
Message
()
msg
[
'Reply-To'
]
=
'Britische Regierung gibt gr
\xfc
nes Licht f
\xfc
r Offshore-Windkraftprojekte <a-very-long-address@example.com>'
header_string
=
(
'Britische Regierung gibt gr
\xfc
nes Licht '
eq
(
msg
.
as_string
(),
"""
\
'f
\xfc
r Offshore-Windkraftprojekte '
Reply-To: Britische Regierung gibt gr
\xfc
nes Licht f
\xfc
r Offshore-Windkraftprojekte <a-very-long-address@example.com>
'<a-very-long-address@example.com>'
)
msg
[
'Reply-To'
]
=
header_string
self
.
assertRaises
(
UnicodeEncodeError
,
msg
.
as_string
)
msg
=
Message
()
msg
[
'Reply-To'
]
=
Header
(
header_string
,
'utf-8'
,
header_name
=
'Reply-To'
)
eq
(
msg
.
as_string
(
maxheaderlen
=
78
),
"""
\
Reply-To: =?utf-8?q?Britische_Regierung_gibt_gr=C3=BCnes_Licht_f=C3=BCr_Offs?=
=?utf-8?q?hore-Windkraftprojekte_=3Ca-very-long-address=40example=2Ecom=3E?=
"""
)
"""
)
...
@@ -1010,9 +1018,9 @@ class TestMIMEApplication(unittest.TestCase):
...
@@ -1010,9 +1018,9 @@ class TestMIMEApplication(unittest.TestCase):
def
test_body
(
self
):
def
test_body
(
self
):
eq
=
self
.
assertEqual
eq
=
self
.
assertEqual
bytes
=
'
\xfa\xfb\xfc\xfd\xfe\xff
'
bytes
=
b
'
\xfa\xfb\xfc\xfd\xfe\xff
'
msg
=
MIMEApplication
(
bytes
)
msg
=
MIMEApplication
(
bytes
)
eq
(
msg
.
get_payload
(),
'+vv8/f7/'
)
eq
(
msg
.
get_payload
(),
b
'+vv8/f7/'
)
eq
(
msg
.
get_payload
(
decode
=
True
),
bytes
)
eq
(
msg
.
get_payload
(
decode
=
True
),
bytes
)
...
...
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