Skip to content
Myr

Merge branch 'master' of github.com:kennethreitz/requests

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Kenneth Reitz · committed by Kenneth Reitz · parents 14176d1, 1ea4e21 · Browse files · 2 files+28 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+28 added−3 removed

  • tests:+21 added−0 removed
  • other:+7 added−3 removed

2 files+28 added−3 removed

modified:requests/help.py+7 added-3 removed
83 unmodified lines
84 cryptography_info = {85 'version': getattr(cryptography, '__version__', ''),86 }8788 # OPENSSL_VERSION_NUMBER doesn't exist in the Python 2.6 ssl module.89 system_ssl = getattr(ssl, 'OPENSSL_VERSION_NUMBER', None)90 system_ssl_info = {91 'version': '%x' % system_ssl if system_ssl is not None else ''92 }9394 return {95 'platform': platform_info,96 'implementation': implementation_info,91 'system_ssl': {92 'version': '%x' % ssl.OPENSSL_VERSION_NUMBER,93 },97 'system_ssl': system_ssl_info,98 'using_pyopenssl': pyopenssl is not None,99 'pyOpenSSL': pyopenssl_info,100 'urllib3': urllib3_info,101 'chardet': chardet_info,
14 unmodified lines
added:tests/test_help.py+21 added
1# -*- encoding: utf-823import sys45import pytest67from requests.help import info8910@pytest.mark.skipif(sys.version_info[:2] != (2,6), reason="Only run on Python 2.6")11def test_system_ssl_py26():12 """OPENSSL_VERSION_NUMBER isn't provided in Python 2.6, verify we don't13 blow up in this case.14 """15 assert info()['system_ssl'] == {'version': ''}161718@pytest.mark.skipif(sys.version_info < (2,7), reason="Only run on Python 2.7+")19def test_system_ssl():20 """Verify we're actually setting system_ssl when it should be available."""21 assert info()['system_ssl']['version'] != ''