Skip to content
Myr

test_help.py

This file

Path

tests/test_help.py

31 lines · 866 bytes · Python

Last changed by

Merge pull request #4835 from requests/2.20.0Nate Prewittbefore adoption75bdc99

History of this file

Take it

The walk stopped after 200 commits: lines older than e4d214d point at it.

Merge pull request #4749 from derlin/masterNate Prewittbefore adoptione4d214d

lines 1–31why, one step back
1# -*- encoding: utf-8
23import sys45import pytest67from requests.help import info8910def test_system_ssl():11 """Verify we're actually setting system_ssl when it should be available."""12 assert info()['system_ssl']['version'] != ''131415class VersionedPackage(object):16 def __init__(self, version):17 self.__version__ = version181920def test_idna_without_version_attribute(mocker):21 """Older versions of IDNA don't provide a __version__ attribute, verify22 that if we have such a package, we don't blow up.23 """24 mocker.patch('requests.help.idna', new=None)25 assert info()['idna'] == {'version': ''}262728def test_idna_with_version_attribute(mocker):29 """Verify we're actually setting idna version when it should be available."""30 mocker.patch('requests.help.idna', new=VersionedPackage('2.6'))31 assert info()['idna'] == {'version': '2.6'}