Home / File/ test_requests.py — requests Source File

test_requests.py — requests Source File

Architecture documentation for test_requests.py, a python file in the requests codebase. 32 imports, 0 dependents.

File python CoreAPI SessionLifecycle 32 imports 14 functions 15 classes

Entity Profile

Dependency Diagram

graph LR
  69ebfd6f_8f0c_4586_0c19_2c348e1a42a2["test_requests.py"]
  31164f8f_838d_056d_817a_22fe633885b4["31164f8f:838d:056d:817a:22fe633885b4"]
  69ebfd6f_8f0c_4586_0c19_2c348e1a42a2 --> 31164f8f_838d_056d_817a_22fe633885b4
  e5a6a063_2dfc_096a_27c7_bb536a14c8e5["compat.py"]
  69ebfd6f_8f0c_4586_0c19_2c348e1a42a2 --> e5a6a063_2dfc_096a_27c7_bb536a14c8e5
  b16ffa26_8069_dfbb_db7d_3ae1f171dc98["StringIO"]
  69ebfd6f_8f0c_4586_0c19_2c348e1a42a2 --> b16ffa26_8069_dfbb_db7d_3ae1f171dc98
  dea0bb8d_23a7_9d6c_2dda_8f904d6ab9d3["testserver.server"]
  69ebfd6f_8f0c_4586_0c19_2c348e1a42a2 --> dea0bb8d_23a7_9d6c_2dda_8f904d6ab9d3
  401710e9_48ff_8931_a59f_9cf0334b86f2["utils.py"]
  69ebfd6f_8f0c_4586_0c19_2c348e1a42a2 --> 401710e9_48ff_8931_a59f_9cf0334b86f2
  eb4927de_0f5a_e91b_5675_eee3babf26c6["override_environ"]
  69ebfd6f_8f0c_4586_0c19_2c348e1a42a2 --> eb4927de_0f5a_e91b_5675_eee3babf26c6
  ccaec2dd_688f_da13_1759_2748abf12131["collections"]
  69ebfd6f_8f0c_4586_0c19_2c348e1a42a2 --> ccaec2dd_688f_da13_1759_2748abf12131
  c719cb58_682a_f9be_9cd6_9d93810c7780["contextlib"]
  69ebfd6f_8f0c_4586_0c19_2c348e1a42a2 --> c719cb58_682a_f9be_9cd6_9d93810c7780
  b1946df2_c2d7_8311_fc51_9844255a3d78["io"]
  69ebfd6f_8f0c_4586_0c19_2c348e1a42a2 --> b1946df2_c2d7_8311_fc51_9844255a3d78
  bdbb7835_2516_c692_80a4_4e23b389849e["json"]
  69ebfd6f_8f0c_4586_0c19_2c348e1a42a2 --> bdbb7835_2516_c692_80a4_4e23b389849e
  ee4485bf_7f24_0a4f_5207_2b9a2d911e29["os"]
  69ebfd6f_8f0c_4586_0c19_2c348e1a42a2 --> ee4485bf_7f24_0a4f_5207_2b9a2d911e29
  91f595f2_c290_1ea4_58ae_466a296e5175["pickle"]
  69ebfd6f_8f0c_4586_0c19_2c348e1a42a2 --> 91f595f2_c290_1ea4_58ae_466a296e5175
  bf35b237_3fd1_dc85_411c_b1c073e3a773["re"]
  69ebfd6f_8f0c_4586_0c19_2c348e1a42a2 --> bf35b237_3fd1_dc85_411c_b1c073e3a773
  c1b6061c_2e4d_7496_1fe2_36dedc6d0fab["tempfile"]
  69ebfd6f_8f0c_4586_0c19_2c348e1a42a2 --> c1b6061c_2e4d_7496_1fe2_36dedc6d0fab
  style 69ebfd6f_8f0c_4586_0c19_2c348e1a42a2 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

"""Tests for Requests."""

import collections
import contextlib
import io
import json
import os
import pickle
import re
import tempfile
import threading
import warnings
from unittest import mock

import pytest
import urllib3
from urllib3.util import Timeout as Urllib3Timeout

import requests
from requests.adapters import HTTPAdapter
from requests.auth import HTTPDigestAuth, _basic_auth_str
from requests.compat import (
    JSONDecodeError,
    Morsel,
    MutableMapping,
    builtin_str,
    cookielib,
    getproxies,
    is_urllib3_1,
    urlparse,
)
from requests.cookies import cookiejar_from_dict, morsel_to_cookie
from requests.exceptions import (
    ChunkedEncodingError,
    ConnectionError,
    ConnectTimeout,
    ContentDecodingError,
    InvalidHeader,
    InvalidProxyURL,
    InvalidSchema,
    InvalidURL,
    MissingSchema,
    ProxyError,
    ReadTimeout,
    RequestException,
    RetryError,
    Timeout,
    TooManyRedirects,
    UnrewindableBodyError,
)
from requests.exceptions import SSLError as RequestsSSLError
from requests.hooks import default_hooks
from requests.models import PreparedRequest, urlencode
from requests.sessions import SessionRedirectMixin
from requests.structures import CaseInsensitiveDict

from . import SNIMissingWarning
from .compat import StringIO
from .testserver.server import TLSServer, consume_socket_content
from .utils import override_environ
// ... (2980 more lines)

Domain

Subdomains

Dependencies

  • 31164f8f:838d:056d:817a:22fe633885b4
  • StringIO
  • collections
  • compat.py
  • contextlib
  • io
  • json
  • os
  • override_environ
  • pickle
  • pytest
  • re
  • requests
  • requests.adapters
  • requests.auth
  • requests.compat
  • requests.cookies
  • requests.exceptions
  • requests.hooks
  • requests.models
  • requests.packages.urllib3.poolmanager
  • requests.sessions
  • requests.structures
  • ssl
  • tempfile
  • testserver.server
  • threading
  • unittest
  • urllib3
  • urllib3.util
  • utils.py
  • warnings

Frequently Asked Questions

What does test_requests.py do?
test_requests.py is a source file in the requests codebase, written in python. It belongs to the CoreAPI domain, SessionLifecycle subdomain.
What functions are defined in test_requests.py?
test_requests.py defines 14 function(s): HAS_MODERN_SSL, HAS_PYOPENSSL, requests, ssl, test_content_length_for_bytes_data, test_content_length_for_string_data_counts_bytes, test_data_argument_accepts_tuples, test_json_decode_errors_are_serializable_deserializable, test_json_encodes_as_bytes, test_prepared_copy, and 4 more.
What does test_requests.py depend on?
test_requests.py imports 32 module(s): 31164f8f:838d:056d:817a:22fe633885b4, StringIO, collections, compat.py, contextlib, io, json, os, and 24 more.
Where is test_requests.py in the architecture?
test_requests.py is located at tests/test_requests.py (domain: CoreAPI, subdomain: SessionLifecycle, directory: tests).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free