'L{URL.click} collapses C{.} and C{..} according to RFC 3986 section
5.2.4.'

def test_clickCollapse(self):

    tests = [[u'http://localhost/', u'.', u'http://localhost/'], [u'http://localhost/', u'..', u'http://localhost/'], [u'http://localhost/a/b/c', u'.', u'http://localhost/a/b/'], [u'http://localhost/a/b/c', u'..', u'http://localhost/a/'], [u'http://localhost/a/b/c', u'./d/e', u'http://localhost/a/b/d/e'], [u'http://localhost/a/b/c', u'../d/e', u'http://localhost/a/d/e'], [u'http://localhost/a/b/c', u'/./d/e', u'http://localhost/d/e'], [u'http://localhost/a/b/c', u'/../d/e', u'http://localhost/d/e'], [u'http://localhost/a/b/c/', u'../../d/e/', u'http://localhost/a/d/e/'], [u'http://localhost/a/./c', u'../d/e', u'http://localhost/d/e'], [u'http://localhost/a/./c/', u'../d/e', u'http://localhost/a/d/e'], [u'http://localhost/a/b/c/d', u'./e/../f/../g', u'http://localhost/a/b/c/g'], [u'http://localhost/a/b/c', u'd//e', u'http://localhost/a/b/d//e']]
    for (start, click, expected) in tests:
        actual = URL.fromText(start).click(click).asText()
        self.assertEqual(actual, expected, u'{start}.click({click})    =>    {actual}    not    {expected}'.format(start=start, click=repr(click), actual=actual, expected=expected))
