Home / Function/ test_custom_content_type() — requests Function Reference

test_custom_content_type() — requests Function Reference

Architecture documentation for the test_custom_content_type() function in test_requests.py from the requests codebase.

Entity Profile

Dependency Diagram

graph TD
  c5d7e25c_adb8_eda5_e3e4_baf28103197d["test_custom_content_type()"]
  22b80b19_26d4_cd0e_c476_3edf87b3df14["TestRequests"]
  c5d7e25c_adb8_eda5_e3e4_baf28103197d -->|defined in| 22b80b19_26d4_cd0e_c476_3edf87b3df14
  style c5d7e25c_adb8_eda5_e3e4_baf28103197d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_requests.py lines 1144–1154

    def test_custom_content_type(self, httpbin):
        with open(__file__, "rb") as f1:
            with open(__file__, "rb") as f2:
                data = {"stuff": json.dumps({"a": 123})}
                files = {
                    "file1": ("test_requests.py", f1),
                    "file2": ("test_requests", f2, "text/py-content-type"),
                }
                r = requests.post(httpbin("post"), data=data, files=files)
        assert r.status_code == 200
        assert b"text/py-content-type" in r.request.body

Domain

Subdomains

Frequently Asked Questions

What does test_custom_content_type() do?
test_custom_content_type() is a function in the requests codebase, defined in tests/test_requests.py.
Where is test_custom_content_type() defined?
test_custom_content_type() is defined in tests/test_requests.py at line 1144.

Analyze Your Own Codebase

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

Try Supermodel Free