'L{URL.add} adds query parameters.'

def test_queryAdd(self):

    self.assertEqual(u'http://www.foo.com/a/nice/path/?foo=bar', URL.fromText(u'http://www.foo.com/a/nice/path/').add(u'foo', u'bar').asText())
    self.assertEqual(u'http://www.foo.com/?foo=bar', URL(host=u'www.foo.com').add(u'foo', u'bar').asText())
    urlpath = URL.fromText(theurl)
    self.assertEqual(u'http://www.foo.com/a/nice/path/?zot=23&zut&burp', urlpath.add(u'burp').asText())
    self.assertEqual(u'http://www.foo.com/a/nice/path/?zot=23&zut&burp=xxx', urlpath.add(u'burp', u'xxx').asText())
    self.assertEqual(u'http://www.foo.com/a/nice/path/?zot=23&zut&burp=xxx&zing', urlpath.add(u'burp', u'xxx').add(u'zing').asText())
    self.assertEqual(u'http://www.foo.com/a/nice/path/?zot=23&zut&zing&burp=xxx', urlpath.add(u'zing').add(u'burp', u'xxx').asText())
    self.assertEqual(u'http://www.foo.com/a/nice/path/?zot=23&zut&burp=xxx&zot=32', urlpath.add(u'burp', u'xxx').add(u'zot', u'32').asText())
