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
bd757ba1
Kaydet (Commit)
bd757ba1
authored
Mar 11, 2003
tarafından
Barry Warsaw
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Adjust tests for no newline appending to MIMEText.__init__()'s _text
argument.
üst
cbec700b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
11 deletions
+7
-11
test_email.py
Lib/email/test/test_email.py
+7
-11
No files found.
Lib/email/test/test_email.py
Dosyayı görüntüle @
bd757ba1
...
...
@@ -484,21 +484,21 @@ class TestEncoders(unittest.TestCase):
def
test_encode_noop
(
self
):
eq
=
self
.
assertEqual
msg
=
MIMEText
(
'hello world'
,
_encoder
=
Encoders
.
encode_noop
)
eq
(
msg
.
get_payload
(),
'hello world
\n
'
)
eq
(
msg
.
get_payload
(),
'hello world'
)
def
test_encode_7bit
(
self
):
eq
=
self
.
assertEqual
msg
=
MIMEText
(
'hello world'
,
_encoder
=
Encoders
.
encode_7or8bit
)
eq
(
msg
.
get_payload
(),
'hello world
\n
'
)
eq
(
msg
.
get_payload
(),
'hello world'
)
eq
(
msg
[
'content-transfer-encoding'
],
'7bit'
)
msg
=
MIMEText
(
'hello
\x7f
world'
,
_encoder
=
Encoders
.
encode_7or8bit
)
eq
(
msg
.
get_payload
(),
'hello
\x7f
world
\n
'
)
eq
(
msg
.
get_payload
(),
'hello
\x7f
world'
)
eq
(
msg
[
'content-transfer-encoding'
],
'7bit'
)
def
test_encode_8bit
(
self
):
eq
=
self
.
assertEqual
msg
=
MIMEText
(
'hello
\x80
world'
,
_encoder
=
Encoders
.
encode_7or8bit
)
eq
(
msg
.
get_payload
(),
'hello
\x80
world
\n
'
)
eq
(
msg
.
get_payload
(),
'hello
\x80
world'
)
eq
(
msg
[
'content-transfer-encoding'
],
'8bit'
)
def
test_encode_empty_payload
(
self
):
...
...
@@ -510,13 +510,13 @@ class TestEncoders(unittest.TestCase):
def
test_encode_base64
(
self
):
eq
=
self
.
assertEqual
msg
=
MIMEText
(
'hello world'
,
_encoder
=
Encoders
.
encode_base64
)
eq
(
msg
.
get_payload
(),
'aGVsbG8gd29ybGQ
K
\n
'
)
eq
(
msg
.
get_payload
(),
'aGVsbG8gd29ybGQ
=
'
)
eq
(
msg
[
'content-transfer-encoding'
],
'base64'
)
def
test_encode_quoted_printable
(
self
):
eq
=
self
.
assertEqual
msg
=
MIMEText
(
'hello world'
,
_encoder
=
Encoders
.
encode_quopri
)
eq
(
msg
.
get_payload
(),
'hello=20world
\n
'
)
eq
(
msg
.
get_payload
(),
'hello=20world'
)
eq
(
msg
[
'content-transfer-encoding'
],
'quoted-printable'
)
def
test_default_cte
(
self
):
...
...
@@ -1005,7 +1005,7 @@ class TestMIMEText(unittest.TestCase):
is
missing
)
def
test_payload
(
self
):
self
.
assertEqual
(
self
.
_msg
.
get_payload
(),
'hello there
\n
'
)
self
.
assertEqual
(
self
.
_msg
.
get_payload
(),
'hello there'
)
self
.
failUnless
(
not
self
.
_msg
.
is_multipart
())
def
test_charset
(
self
):
...
...
@@ -1123,7 +1123,6 @@ MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
hello world
--BOUNDARY--
'''
)
...
...
@@ -1151,7 +1150,6 @@ MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
hello world
--BOUNDARY--
'''
)
...
...
@@ -1471,14 +1469,12 @@ MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
One
--BOUNDARY
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Two
--BOUNDARY--
"""
)
...
...
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