MCPcopy
hub / github.com/psf/requests / test_data_argument_accepts_tuples

Function test_data_argument_accepts_tuples

tests/test_requests.py:2674–2682  ·  view source on GitHub ↗

Ensure that the data argument will accept tuples of strings and properly encode them.

(data)

Source from the content-addressed store, hash-verified

2672 ),
2673)
2674def test_data_argument_accepts_tuples(data):
2675 """Ensure that the data argument will accept tuples of strings
2676 and properly encode them.
2677 """
2678 p = PreparedRequest()
2679 p.prepare(
2680 method="GET", url="http://www.example.com", data=data, hooks=default_hooks()
2681 )
2682 assert p.body == urlencode(data)
2683
2684
2685@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 3

prepareMethod · 0.95
PreparedRequestClass · 0.90
default_hooksFunction · 0.90

Tested by

no test coverage detected