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
05c511f1
Commit
05c511f1
authored
Nov 01, 2013
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
asyncio: Slight rearrangement of tests for server_hostname=...
parent
28dff0d8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
Lib/test/test_asyncio/test_base_events.py
Lib/test/test_asyncio/test_base_events.py
+4
-3
No files found.
Lib/test/test_asyncio/test_base_events.py
View file @
05c511f1
...
...
@@ -444,7 +444,7 @@ class BaseEventLoopWithSelectorTests(unittest.TestCase):
self
.
assertRaises
(
OSError
,
self
.
loop
.
run_until_complete
,
coro
)
def
test_create_connection_server_hostname_default
(
self
):
def
test_create_connection_s
sl_s
erver_hostname_default
(
self
):
self
.
loop
.
getaddrinfo
=
unittest
.
mock
.
Mock
()
def
mock_getaddrinfo
(
*
args
,
**
kwds
):
...
...
@@ -490,8 +490,8 @@ class BaseEventLoopWithSelectorTests(unittest.TestCase):
server_side
=
False
,
server_hostname
=
''
)
def
test_create_connection_server_hostname_errors
(
self
):
# When not using ssl, server_hostname must be None
(but '' is OK)
.
def
test_create_connection_
no_ssl_
server_hostname_errors
(
self
):
# When not using ssl, server_hostname must be None.
coro
=
self
.
loop
.
create_connection
(
MyProto
,
'python.org'
,
80
,
server_hostname
=
''
)
self
.
assertRaises
(
ValueError
,
self
.
loop
.
run_until_complete
,
coro
)
...
...
@@ -499,6 +499,7 @@ class BaseEventLoopWithSelectorTests(unittest.TestCase):
server_hostname
=
'python.org'
)
self
.
assertRaises
(
ValueError
,
self
.
loop
.
run_until_complete
,
coro
)
def
test_create_connection_ssl_server_hostname_errors
(
self
):
# When using ssl, server_hostname may be None if host is non-empty.
coro
=
self
.
loop
.
create_connection
(
MyProto
,
''
,
80
,
ssl
=
True
)
self
.
assertRaises
(
ValueError
,
self
.
loop
.
run_until_complete
,
coro
)
...
...
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