test_utils.py — requests Source File
Architecture documentation for test_utils.py, a python file in the requests codebase. 18 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 5828793e_be5b_8952_37f1_338fd4634a1a["test_utils.py"] e5a6a063_2dfc_096a_27c7_bb536a14c8e5["compat.py"] 5828793e_be5b_8952_37f1_338fd4634a1a --> e5a6a063_2dfc_096a_27c7_bb536a14c8e5 b16ffa26_8069_dfbb_db7d_3ae1f171dc98["StringIO"] 5828793e_be5b_8952_37f1_338fd4634a1a --> b16ffa26_8069_dfbb_db7d_3ae1f171dc98 72482cd7_1f0c_8606_730f_d4427cbcdf61["cStringIO"] 5828793e_be5b_8952_37f1_338fd4634a1a --> 72482cd7_1f0c_8606_730f_d4427cbcdf61 88441990_55c5_ac59_3cfd_8b5cacc0cb3c["copy"] 5828793e_be5b_8952_37f1_338fd4634a1a --> 88441990_55c5_ac59_3cfd_8b5cacc0cb3c 9f18afd7_2959_5789_15da_fee6d4c617f3["filecmp"] 5828793e_be5b_8952_37f1_338fd4634a1a --> 9f18afd7_2959_5789_15da_fee6d4c617f3 ee4485bf_7f24_0a4f_5207_2b9a2d911e29["os"] 5828793e_be5b_8952_37f1_338fd4634a1a --> ee4485bf_7f24_0a4f_5207_2b9a2d911e29 d1d57225_15bc_f1cf_7f19_abca2805b155["tarfile"] 5828793e_be5b_8952_37f1_338fd4634a1a --> d1d57225_15bc_f1cf_7f19_abca2805b155 7acf4c67_fdc0_6887_0c42_d7a1210bd755["zipfile"] 5828793e_be5b_8952_37f1_338fd4634a1a --> 7acf4c67_fdc0_6887_0c42_d7a1210bd755 ccaec2dd_688f_da13_1759_2748abf12131["collections"] 5828793e_be5b_8952_37f1_338fd4634a1a --> ccaec2dd_688f_da13_1759_2748abf12131 b1946df2_c2d7_8311_fc51_9844255a3d78["io"] 5828793e_be5b_8952_37f1_338fd4634a1a --> b1946df2_c2d7_8311_fc51_9844255a3d78 a001fb8b_b6e8_2523_3a04_57e49ae15119["unittest"] 5828793e_be5b_8952_37f1_338fd4634a1a --> a001fb8b_b6e8_2523_3a04_57e49ae15119 b820826b_04e7_9e1b_bbf6_b336eaff9a23["pytest"] 5828793e_be5b_8952_37f1_338fd4634a1a --> b820826b_04e7_9e1b_bbf6_b336eaff9a23 ce06e854_c78b_b510_291a_dbc144a59aff["requests"] 5828793e_be5b_8952_37f1_338fd4634a1a --> ce06e854_c78b_b510_291a_dbc144a59aff fc9818d1_907b_d203_5a44_e50b91ebb879["requests._internal_utils"] 5828793e_be5b_8952_37f1_338fd4634a1a --> fc9818d1_907b_d203_5a44_e50b91ebb879 style 5828793e_be5b_8952_37f1_338fd4634a1a fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import copy
import filecmp
import os
import tarfile
import zipfile
from collections import deque
from io import BytesIO
from unittest import mock
import pytest
from requests import compat
from requests._internal_utils import unicode_is_ascii
from requests.cookies import RequestsCookieJar
from requests.structures import CaseInsensitiveDict
from requests.utils import (
_parse_content_type_header,
add_dict_to_cookiejar,
address_in_network,
dotted_netmask,
extract_zipped_paths,
get_auth_from_url,
get_encoding_from_headers,
get_encodings_from_content,
get_environ_proxies,
get_netrc_auth,
guess_filename,
guess_json_utf,
is_ipv4_address,
is_valid_cidr,
iter_slices,
parse_dict_header,
parse_header_links,
prepend_scheme_if_needed,
requote_uri,
select_proxy,
set_environ,
should_bypass_proxies,
super_len,
to_key_val_list,
to_native_string,
unquote_header_value,
unquote_unreserved,
urldefragauth,
)
from .compat import StringIO, cStringIO
class TestSuperLen:
@pytest.mark.parametrize(
"stream, value",
(
(StringIO.StringIO, "Test"),
(BytesIO, b"Test"),
pytest.param(
cStringIO, "Test", marks=pytest.mark.skipif("cStringIO is None")
),
),
)
// ... (918 more lines)
Domain
Subdomains
Functions
- test__parse_content_type_header()
- test_add_dict_to_cookiejar()
- test_dotted_netmask()
- test_get_auth_from_url()
- test_get_encoding_from_headers()
- test_iter_slices()
- test_parse_dict_header()
- test_parse_header_links()
- test_prepend_scheme_if_needed()
- test_requote_uri_with_unquoted_percents()
- test_select_proxies()
- test_set_environ()
- test_set_environ_raises_exception()
- test_should_bypass_proxies()
- test_should_bypass_proxies_no_proxy()
- test_should_bypass_proxies_pass_only_hostname()
- test_should_bypass_proxies_win_registry()
- test_should_bypass_proxies_win_registry_ProxyOverride_value()
- test_should_bypass_proxies_win_registry_bad_values()
- test_to_native_string()
- test_unicode_is_ascii()
- test_unquote_unreserved()
- test_urldefragauth()
Classes
Dependencies
Source
Frequently Asked Questions
What does test_utils.py do?
test_utils.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_utils.py?
test_utils.py defines 23 function(s): test__parse_content_type_header, test_add_dict_to_cookiejar, test_dotted_netmask, test_get_auth_from_url, test_get_encoding_from_headers, test_iter_slices, test_parse_dict_header, test_parse_header_links, test_prepend_scheme_if_needed, test_requote_uri_with_unquoted_percents, and 13 more.
What does test_utils.py depend on?
test_utils.py imports 18 module(s): StringIO, cStringIO, collections, compat.py, copy, filecmp, io, os, and 10 more.
Where is test_utils.py in the architecture?
test_utils.py is located at tests/test_utils.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