Пример #1
0
 def test_escape(self):
     """Assert that we are only escaping unicode"""
     self.assertRaises(ValueError, escape, b"I am a string type. Not a unicode type.")
     self.assertEqual(escape("I am a unicode type."), "I%20am%20a%20unicode%20type.")
Пример #2
0
 def test_escape(self):
     """Assert that we are only escaping unicode"""
     self.assertRaises(ValueError, escape, b"I am a string type. Not a unicode type.")
     self.assertEqual(escape("I am a unicode type."), "I%20am%20a%20unicode%20type.")