Home / Class/ TestToKeyValList Class — requests Architecture

TestToKeyValList Class — requests Architecture

Architecture documentation for the TestToKeyValList class in test_utils.py from the requests codebase.

Entity Profile

Dependency Diagram

graph TD
  f3f22da7_12cd_0762_0c92_5d6097a677ba["TestToKeyValList"]
  5828793e_be5b_8952_37f1_338fd4634a1a["test_utils.py"]
  f3f22da7_12cd_0762_0c92_5d6097a677ba -->|defined in| 5828793e_be5b_8952_37f1_338fd4634a1a
  8d013122_190f_4bb6_57b1_dd09d361ffd8["test_valid()"]
  f3f22da7_12cd_0762_0c92_5d6097a677ba -->|method| 8d013122_190f_4bb6_57b1_dd09d361ffd8
  ad517b02_f467_fb5a_2ccf_0871f72334cf["test_invalid()"]
  f3f22da7_12cd_0762_0c92_5d6097a677ba -->|method| ad517b02_f467_fb5a_2ccf_0871f72334cf

Relationship Graph

Source Code

tests/test_utils.py lines 174–189

class TestToKeyValList:
    @pytest.mark.parametrize(
        "value, expected",
        (
            ([("key", "val")], [("key", "val")]),
            ((("key", "val"),), [("key", "val")]),
            ({"key": "val"}, [("key", "val")]),
            (None, None),
        ),
    )
    def test_valid(self, value, expected):
        assert to_key_val_list(value) == expected

    def test_invalid(self):
        with pytest.raises(ValueError):
            to_key_val_list("string")

Domain

Defined In

Frequently Asked Questions

What is the TestToKeyValList class?
TestToKeyValList is a class in the requests codebase, defined in tests/test_utils.py.
Where is TestToKeyValList defined?
TestToKeyValList is defined in tests/test_utils.py at line 174.

Analyze Your Own Codebase

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

Try Supermodel Free