def test_quote_unreserved_percent(self): s = 'a=3.5%;b=2%' qs = urlquote(s) self.assertTrue('%' in qs) uqs = unquote_unreserved(qs) self.assertNotEqual(uqs, s) s = 'a~b_(c-d).' qs = urlquote(s) + '%f' uqs = unquote_unreserved(qs) self.assertEqual(uqs, s+'%f')
def test_quote_unreserved_percent(self): s = 'a=3.5%;b=2%' qs = urlquote(s) self.assertTrue('%' in qs) uqs = unquote_unreserved(qs) self.assertNotEqual(uqs, s) s = 'a~b_(c-d).' qs = urlquote(s) + '%f' uqs = unquote_unreserved(qs) self.assertEqual(uqs, s + '%f')
def test_quote_unreserved_percent(self): s = "a=3.5%;b=2%" qs = urlquote(s) self.assertTrue("%" in qs) uqs = unquote_unreserved(qs) self.assertNotEqual(uqs, s) s = "a~b_(c-d)." qs = urlquote(s) + "%f" uqs = unquote_unreserved(qs) self.assertEqual(uqs, s + "%f")
def test_quote_unreserved(self): '''Test a string of unreserved characters''' s = 'a~b_(c-d).' qs = urlquote(s) self.assertTrue('%' in qs) uqs = unquote_unreserved(qs) self.assertEqual(uqs, s) self.assertEqual(requote_uri(s), s) self.assertEqual(requote_uri(qs), s)
def test_quote_unreserved(self): """Test a string of unreserved characters""" s = "a~b_(c-d)." qs = urlquote(s) self.assertTrue("%" in qs) uqs = unquote_unreserved(qs) self.assertEqual(uqs, s) self.assertEqual(requote_uri(s), s) self.assertEqual(requote_uri(qs), s)
def test_quote_unreserved_new(self): s = 'a~b_(c-d).' qs = urlquote(s) self.assertTrue('%' not in qs) self._quote_unreserved(s, qs)