def assertUrisEqual(testcase, expected, actual):
 expected = urlparse(expected)
 actual = urlparse(actual)
 testcase.assertEqual(expected.scheme, actual.scheme)
 testcase.assertEqual(expected.netloc, actual.netloc)
 testcase.assertEqual(expected.path, actual.path)
 testcase.assertEqual(expected.params, actual.params)
 testcase.assertEqual(expected.fragment, actual.fragment)
 expected_query = parse_qs(expected.query)
 actual_query = parse_qs(actual.query)
 for name in list(expected_query.keys()):
  testcase.assertEqual(expected_query[name], actual_query[name])
 for name in list(actual_query.keys()):
  testcase.assertEqual(expected_query[name], actual_query[name])

def assertUrisEqual ( testcase , expected , actual ) : expected = urlparse ( expected ) actual = urlparse ( actual ) testcase . assertEqual ( expected . scheme , actual . scheme ) testcase . assertEqual ( expected . netloc , actual . netloc ) testcase . assertEqual ( expected . path , actual . path ) testcase . assertEqual ( expected . params , actual . params ) testcase . assertEqual ( expected . fragment , actual . fragment ) expected_query = parse_qs ( expected . query ) actual_query = parse_qs ( actual . query ) for name in list ( expected_query . keys ( ) ) : testcase . assertEqual ( expected_query [ name ] , actual_query [ name ] ) for name in list ( actual_query . keys ( ) ) : testcase . assertEqual ( expected_query [ name ] , actual_query [ name ] )
test that uris are the same .