forked from orbit-oss/flask
SSLContext was added in Python 2.7.9
This commit is contained in:
parent
a35a97e49d
commit
a913b4dafd
2 changed files with 4 additions and 4 deletions
|
|
@ -521,12 +521,12 @@ def test_run_cert_import(monkeypatch):
|
|||
run_command.make_context('run', ['--cert', 'not_here'])
|
||||
|
||||
# not an SSLContext
|
||||
if sys.version_info >= (2, 7):
|
||||
if sys.version_info >= (2, 7, 9):
|
||||
with pytest.raises(click.BadParameter):
|
||||
run_command.make_context('run', ['--cert', 'flask'])
|
||||
|
||||
# SSLContext
|
||||
if sys.version_info < (2, 7):
|
||||
if sys.version_info < (2, 7, 9):
|
||||
ssl_context = object()
|
||||
else:
|
||||
ssl_context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue