Home / Function/ test_not_vulnerable_to_bad_url_parsing() — requests Function Reference

test_not_vulnerable_to_bad_url_parsing() — requests Function Reference

Architecture documentation for the test_not_vulnerable_to_bad_url_parsing() function in test_utils.py from the requests codebase.

Entity Profile

Dependency Diagram

graph TD
  bf998f54_2c7b_49af_b0a0_21c886894ef2["test_not_vulnerable_to_bad_url_parsing()"]
  23480515_8a49_da54_fb28_99055856000a["TestGetNetrcAuth"]
  bf998f54_2c7b_49af_b0a0_21c886894ef2 -->|defined in| 23480515_8a49_da54_fb28_99055856000a
  style bf998f54_2c7b_49af_b0a0_21c886894ef2 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_utils.py lines 165–171

    def test_not_vulnerable_to_bad_url_parsing(self, tmp_path, monkeypatch):
        netrc_path = tmp_path / ".netrc"
        monkeypatch.setenv("NETRC", str(netrc_path))
        with open(netrc_path, "w") as f:
            f.write("machine example.com login aaaa password bbbb\n")
        auth = get_netrc_auth("http://example.com:@evil.com/'")
        assert auth is None

Domain

Subdomains

Defined In

Frequently Asked Questions

What does test_not_vulnerable_to_bad_url_parsing() do?
test_not_vulnerable_to_bad_url_parsing() is a function in the requests codebase, defined in tests/test_utils.py.
Where is test_not_vulnerable_to_bad_url_parsing() defined?
test_not_vulnerable_to_bad_url_parsing() is defined in tests/test_utils.py at line 165.

Analyze Your Own Codebase

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

Try Supermodel Free