Exemple #1
0
 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')
Exemple #2
0
 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')
Exemple #3
0
 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")
Exemple #4
0
 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)
Exemple #5
0
 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)
Exemple #6
0
 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)
Exemple #7
0
 def test_quote_unreserved_new(self):
     s = 'a~b_(c-d).'
     qs = urlquote(s)
     self.assertTrue('%' not in qs)
     self._quote_unreserved(s, qs)