test_help.py — requests Source File
Architecture documentation for test_help.py, a python file in the requests codebase. 2 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR c813a8f6_ac27_98b0_b893_4e1a2f35d7b8["test_help.py"] a001fb8b_b6e8_2523_3a04_57e49ae15119["unittest"] c813a8f6_ac27_98b0_b893_4e1a2f35d7b8 --> a001fb8b_b6e8_2523_3a04_57e49ae15119 63a61a7a_e846_0ef1_8a3f_a43f778a7ba9["requests.help"] c813a8f6_ac27_98b0_b893_4e1a2f35d7b8 --> 63a61a7a_e846_0ef1_8a3f_a43f778a7ba9 style c813a8f6_ac27_98b0_b893_4e1a2f35d7b8 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
from unittest import mock
from requests.help import info
def test_system_ssl():
"""Verify we're actually setting system_ssl when it should be available."""
assert info()["system_ssl"]["version"] != ""
class VersionedPackage:
def __init__(self, version):
self.__version__ = version
def test_idna_without_version_attribute():
"""Older versions of IDNA don't provide a __version__ attribute, verify
that if we have such a package, we don't blow up.
"""
with mock.patch("requests.help.idna", new=None):
assert info()["idna"] == {"version": ""}
def test_idna_with_version_attribute():
"""Verify we're actually setting idna version when it should be available."""
with mock.patch("requests.help.idna", new=VersionedPackage("2.6")):
assert info()["idna"] == {"version": "2.6"}
Domain
Subdomains
Classes
Dependencies
- requests.help
- unittest
Source
Frequently Asked Questions
What does test_help.py do?
test_help.py is a source file in the requests codebase, written in python. It belongs to the CoreAPI domain, VerbHandlers subdomain.
What functions are defined in test_help.py?
test_help.py defines 3 function(s): test_idna_with_version_attribute, test_idna_without_version_attribute, test_system_ssl.
What does test_help.py depend on?
test_help.py imports 2 module(s): requests.help, unittest.
Where is test_help.py in the architecture?
test_help.py is located at tests/test_help.py (domain: CoreAPI, subdomain: VerbHandlers, directory: tests).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free