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
c69fd86f
Commit
c69fd86f
authored
Dec 17, 2016
by
R David Murray
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#28407 Improve test coverage of make_msgid.
Patch by Dillon Brock.
parent
58667195
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
+13
-0
Lib/test/test_email/test_email.py
Lib/test/test_email/test_email.py
+12
-0
Misc/ACKS
Misc/ACKS
+1
-0
No files found.
Lib/test/test_email/test_email.py
View file @
c69fd86f
...
@@ -11,6 +11,7 @@ import textwrap
...
@@ -11,6 +11,7 @@ import textwrap
from
io
import
StringIO
,
BytesIO
from
io
import
StringIO
,
BytesIO
from
itertools
import
chain
from
itertools
import
chain
from
random
import
choice
from
random
import
choice
from
socket
import
getfqdn
try
:
try
:
from
threading
import
Thread
from
threading
import
Thread
except
ImportError
:
except
ImportError
:
...
@@ -3294,6 +3295,17 @@ multipart/report
...
@@ -3294,6 +3295,17 @@ multipart/report
email
.
utils
.
make_msgid
(
domain
=
'testdomain-string'
)[
-
19
:],
email
.
utils
.
make_msgid
(
domain
=
'testdomain-string'
)[
-
19
:],
'@testdomain-string>'
)
'@testdomain-string>'
)
def
test_make_msgid_idstring
(
self
):
self
.
assertEqual
(
email
.
utils
.
make_msgid
(
idstring
=
'test-idstring'
,
domain
=
'testdomain-string'
)[
-
33
:],
'.test-idstring@testdomain-string>'
)
def
test_make_msgid_default_domain
(
self
):
self
.
assertTrue
(
email
.
utils
.
make_msgid
().
endswith
(
'@'
+
getfqdn
()
+
'>'
))
def
test_Generator_linend
(
self
):
def
test_Generator_linend
(
self
):
# Issue 14645.
# Issue 14645.
with
openfile
(
'msg_26.txt'
,
newline
=
'
\
n
'
)
as
f
:
with
openfile
(
'msg_26.txt'
,
newline
=
'
\
n
'
)
as
f
:
...
...
Misc/ACKS
View file @
c69fd86f
...
@@ -187,6 +187,7 @@ Tom Bridgman
...
@@ -187,6 +187,7 @@ Tom Bridgman
Anthony Briggs
Anthony Briggs
Keith Briggs
Keith Briggs
Tobias Brink
Tobias Brink
Dillon Brock
Richard Brodie
Richard Brodie
Michael Broghton
Michael Broghton
Ammar Brohi
Ammar Brohi
...
...
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