def testSetQueryItems(self): #QUrl.setQueryItems urla = QUrl('http://www.google.com/search?q=python&hl=en') urlb = QUrl('http://www.google.com/search') urlb.setQueryItems(urla.queryItems()) self.assertEqual(urla, urlb)