Exemplo n.º 1
0
 def testMultiQueryParameters(self):
     http_url = "http://www.google.com:80/mail?locale=en_US&support=true#tab1"
     url = Url(http_url)
     parameters = url.get_query_parameters()
     self.assertTrue("locale" in parameters)
     self.assertEqual("en_US", parameters["locale"])
     self.assertTrue("support" in parameters)
     self.assertEqual("true", parameters["support"])
Exemplo n.º 2
0
 def testNoQueryParameters(self):
     http_url = "http://www.google.com:80/mail?missingValue#tab1"
     url = Url(http_url)
     parameters = url.get_query_parameters()
     self.assertTrue(len(parameters) == 0, parameters)
Exemplo n.º 3
0
 def testSingleQueryParameter(self):
     http_url = "http://www.google.com:80/mail?locale=en_US#tab1"
     url = Url(http_url)
     parameters = url.get_query_parameters()
     self.assertTrue("locale" in parameters)
     self.assertEqual("en_US", parameters["locale"])