from urllib.parse import urlparse, parse_qs

def urlEq(url1, url2):
    pr1 = urlparse(url1)
pr2 = urlparse(url2)
return pr1.scheme == pr2.scheme and pr1.netloc == pr2.netloc and pr1.path == pr2.path and parse_qs(
    pr1.query) == parse_qs(pr2.query)
print(urlEq('http://foo.com/blah?bar=1&foo=2',
    'http://foo.com/blah?foo=2&bar=1'))
print(urlEq('http://foo.com/blah?bar=1&foo=2',
    'http://foo.com/blah?foo=4&bar=1'))
Ищу assertURLEquals