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
d094efd8
Commit
d094efd8
authored
Oct 31, 2010
by
Benjamin Peterson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup resources in test_smtplib #10264
parent
076ed000
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
Lib/test/test_smtplib.py
Lib/test/test_smtplib.py
+3
-0
No files found.
Lib/test/test_smtplib.py
View file @
d094efd8
...
...
@@ -487,6 +487,7 @@ class SMTPSimTests(unittest.TestCase):
expected_auth_ok
=
(
235
,
b'plain auth ok'
)
self
.
assertEqual
(
smtp
.
login
(
sim_auth
[
0
],
sim_auth
[
1
]),
expected_auth_ok
)
smtp
.
close
()
# SimSMTPChannel doesn't fully support LOGIN or CRAM-MD5 auth because they
# require a synchronous read to obtain the credentials...so instead smtpd
...
...
@@ -503,6 +504,7 @@ class SMTPSimTests(unittest.TestCase):
except
smtplib
.
SMTPAuthenticationError
as
err
:
if
sim_auth_login_password
not
in
str
(
err
):
raise
"expected encoded password not found in error message"
smtp
.
close
()
def
testAUTH_CRAM_MD5
(
self
):
self
.
serv
.
add_feature
(
"AUTH CRAM-MD5"
)
...
...
@@ -512,6 +514,7 @@ class SMTPSimTests(unittest.TestCase):
except
smtplib
.
SMTPAuthenticationError
as
err
:
if
sim_auth_credentials
[
'cram-md5'
]
not
in
str
(
err
):
raise
"expected encoded credentials not found in error message"
smtp
.
close
()
#TODO: add tests for correct AUTH method fallback now that the
#test infrastructure can support it.
...
...
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