def test_can_percent_decode_plus_to_space(self): decoded = percent_decode("one+two%20three+four") assert decoded == "one two three four"
def test_can_percent_decode_bytes(self): decoded = percent_decode(b"foo") assert decoded == "foo"
def test_can_percent_decode_unicode(self): decoded = percent_decode(ustr("foo")) assert decoded == "foo"
def test_can_percent_decode_number(self): decoded = percent_decode(12) assert decoded == "12"
def test_can_percent_decode_string(self): decoded = percent_decode("foo") assert decoded == "foo"
def test_can_percent_decode_empty_string(self): decoded = percent_decode("") assert decoded == ""
def test_can_percent_decode_none(self): decoded = percent_decode(None) assert decoded is None
def test_partially_decoded_chars_use_replacement_char(self): decoded = percent_decode("El%20Ni%C3") assert decoded == "El Ni�"
def test_can_percent_decode_extended_chars(self): decoded = percent_decode("El%20Ni%C3%B1o") assert decoded == "El Niño"
def test_can_percent_decode_reserved_chars(self): decoded = percent_decode("20%25%20of%20%24100%20%3D%20%2420") assert decoded == "20% of $100 = $20"