예제 #1
0
 def test_unicode_with_control_character(self):
     param = format_form_param("filename", "hello\x1A\x1B\x1C")
     assert param == b'filename="hello%1A\x1B%1C"'
예제 #2
0
 def test_ascii(self):
     param = format_form_param("filename", b"name")
     assert param == b'filename="name"'
예제 #3
0
 def test_unicode_escape(self):
     param = format_form_param("filename", "hello\\world\u0022")
     assert param == b'filename="hello\\\\world%22"'
예제 #4
0
 def test_unicode(self):
     param = format_form_param("filename", "n\u00e4me")
     assert param == b'filename="n\xc3\xa4me"'