def test_urlencode_catches_invalid_input():
    with pytest.raises(ValueError):
        urlencode(['fo'])

    with pytest.raises(ValueError):
        urlencode([('foo', 'bar', 'bogus')])
Show that queries are loosely validated.
dataset/ETHPy150Open sigmavirus24/requests-toolbelt/tests/test_formdata.py/test_urlencode_catches_invalid_input