Skip to content
Myr

test_help.py

This file

Path

tests/test_help.py

27 lines · 839 bytes · Python

Last changed by

Not known.

History of this file

Take it

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

Merge pull request #6519 from psf/dependabot/github_actions/actions/checkout-4.0.0Ian Stapleton Cordascobefore adoption8812812

lines 1–27why, one step back
1from unittest import mock
23from requests.help import info456def test_system_ssl():7 """Verify we're actually setting system_ssl when it should be available."""8 assert info()["system_ssl"]["version"] != ""91011class VersionedPackage:12 def __init__(self, version):13 self.__version__ = version141516def test_idna_without_version_attribute():17 """Older versions of IDNA don't provide a __version__ attribute, verify18 that if we have such a package, we don't blow up.19 """20 with mock.patch("requests.help.idna", new=None):21 assert info()["idna"] == {"version": ""}222324def test_idna_with_version_attribute():25 """Verify we're actually setting idna version when it should be available."""26 with mock.patch("requests.help.idna", new=VersionedPackage("2.6")):27 assert info()["idna"] == {"version": "2.6"}