Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
9546e797
Commit
9546e797
authored
Jun 29, 2002
by
Barry Warsaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Oleg Broytmann's support for RFC 2231 encoded parameters, SF patch #549133
New test cases.
parent
12566a88
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
1 deletion
+34
-1
Lib/test/data/msg_29.txt
Lib/test/data/msg_29.txt
+22
-0
Lib/test/test_email.py
Lib/test/test_email.py
+12
-1
No files found.
Lib/test/data/msg_29.txt
0 → 100644
View file @
9546e797
Return-Path: <bbb@zzz.org>
Delivered-To: bbb@zzz.org
Received: by mail.zzz.org (Postfix, from userid 889)
id 27CEAD38CC; Fri, 4 May 2001 14:05:44 -0400 (EDT)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii;
title*0*="us-ascii'en'This%20is%20even%20more%20";
title*1*="%2A%2A%2Afun%2A%2A%2A%20";
title*2="isn't it!"
Content-Transfer-Encoding: 7bit
Message-ID: <15090.61304.110929.45684@aaa.zzz.org>
From: bbb@ddd.com (John X. Doe)
To: bbb@zzz.org
Subject: This is a test message
Date: Fri, 4 May 2001 14:05:44 -0400
Hi,
Do you like this message?
-Me
Lib/test/test_email.py
View file @
9546e797
...
...
@@ -158,7 +158,7 @@ class TestMessageAPI(TestEmailBase):
msg
.
set_boundary
(
'BOUNDARY'
)
header
,
value
=
msg
.
items
()[
4
]
eq
(
header
.
lower
(),
'content-type'
)
eq
(
value
,
'text/plain; charset=
us-ascii
; boundary="BOUNDARY"'
)
eq
(
value
,
'text/plain; charset=
"us-ascii"
; boundary="BOUNDARY"'
)
# This one has a Content-Type: header, with a boundary, stuck in the
# middle of its headers. Make sure the order is preserved; it should
# be fifth.
...
...
@@ -1787,6 +1787,17 @@ A very long line that must get split to something other than at the
eq
(
h
.
encode
(),
hstr
)
# Test RFC 2231 header parameters decoding
class
TestRFC2231
(
TestEmailBase
):
def
test_get_param
(
self
):
eq
=
self
.
assertEqual
msg
=
self
.
_msgobj
(
'msg_29.txt'
)
eq
(
msg
.
get_param
(
'title'
),
(
'us-ascii'
,
'en'
,
'This is even more ***fun*** isn
\
'
t it!'
))
eq
(
msg
.
get_param
(
'title'
,
unquote
=
0
),
(
'us-ascii'
,
'en'
,
'"This is even more ***fun*** isn
\
'
t it!"'
))
def
_testclasses
():
mod
=
sys
.
modules
[
__name__
]
...
...
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