Home / Function/ test_rewind_body_no_seek() — requests Function Reference

test_rewind_body_no_seek() — requests Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  adda2ee9_f416_0fd5_9944_a6cf425d3a77["test_rewind_body_no_seek()"]
  22b80b19_26d4_cd0e_c476_3edf87b3df14["TestRequests"]
  adda2ee9_f416_0fd5_9944_a6cf425d3a77 -->|defined in| 22b80b19_26d4_cd0e_c476_3edf87b3df14
  f7250866_7829_1b43_7b16_dc94f5dabdf9["tell()"]
  adda2ee9_f416_0fd5_9944_a6cf425d3a77 -->|calls| f7250866_7829_1b43_7b16_dc94f5dabdf9
  style adda2ee9_f416_0fd5_9944_a6cf425d3a77 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_requests.py lines 2000–2018

    def test_rewind_body_no_seek(self):
        class BadFileObj:
            def __init__(self, data):
                self.data = data

            def tell(self):
                return 0

            def __iter__(self):
                return

        data = BadFileObj("the data")
        prep = requests.Request("GET", "http://example.com", data=data).prepare()
        assert prep._body_position == 0

        with pytest.raises(UnrewindableBodyError) as e:
            requests.utils.rewind_body(prep)

        assert "Unable to rewind request body" in str(e)

Domain

Subdomains

Calls

Frequently Asked Questions

What does test_rewind_body_no_seek() do?
test_rewind_body_no_seek() is a function in the requests codebase, defined in tests/test_requests.py.
Where is test_rewind_body_no_seek() defined?
test_rewind_body_no_seek() is defined in tests/test_requests.py at line 2000.
What does test_rewind_body_no_seek() call?
test_rewind_body_no_seek() calls 1 function(s): tell.

Analyze Your Own Codebase

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

Try Supermodel Free