def assertEqualUrl(self, lhs, rhs):
if six.PY2:<EOL><INDENT>lhs = lhs.encode('<STR_LIT:utf8>')<EOL><DEDENT>lhs = urlparse(lhs)<EOL>rhs = urlparse(rhs)<EOL>self.assertEqual(lhs.scheme, rhs.scheme)<EOL>self.assertEqual(lhs.netloc, rhs.netloc)<EOL>self.assertEqual(lhs.path, rhs.path)<EOL>self.assertEqual(lhs.fragment, rhs.fragment)<EOL>self.assertEqual(parse_qsl(lhs.query), parse_qsl(rhs.query))<EOL>
Asserts whether the URLs are canonically equal.