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
3840b49d
Commit
3840b49d
authored
Mar 11, 2003
by
Barry Warsaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test_get_decoded_uu_payload(): A new test for
Content-Transfer-Encoding: x-uuencode
parent
9ac783d7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
Lib/email/test/test_email.py
Lib/email/test/test_email.py
+11
-0
No files found.
Lib/email/test/test_email.py
View file @
3840b49d
...
...
@@ -204,6 +204,17 @@ class TestMessageAPI(TestEmailBase):
eq
(
msg
.
get_payload
(
3
).
get_payload
(
decode
=
True
),
'This has no Content-Transfer-Encoding: header.
\
n
'
)
def
test_get_decoded_uu_payload
(
self
):
eq
=
self
.
assertEqual
msg
=
Message
()
msg
.
set_payload
(
'begin 666 -
\
n
+:&5L;&
\
\
@=V]R;&0
\
n
\
n
end
\
n
'
)
for
cte
in
(
'x-uuencode'
,
'uuencode'
,
'uue'
,
'x-uue'
):
msg
[
'content-transfer-encoding'
]
=
cte
eq
(
msg
.
get_payload
(
decode
=
True
),
'hello world'
)
# Now try some bogus data
msg
.
set_payload
(
'foo'
)
eq
(
msg
.
get_payload
(
decode
=
True
),
'foo'
)
def
test_decoded_generator
(
self
):
eq
=
self
.
assertEqual
msg
=
self
.
_msgobj
(
'msg_07.txt'
)
...
...
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