#NEWLINE# def assert_urls_match( u1 , u2 ) : #NEWLINE# #INDENT# p1 = urllib . parse . urlparse ( u1 ) #NEWLINE# p2 = urllib . parse . urlparse ( u2 ) #NEWLINE# assert ( p1 . scheme == p2 . scheme ) #NEWLINE# assert ( p1 . netloc == p2 . netloc ) #NEWLINE# assert ( p1 . path == p2 . path ) #NEWLINE# assert ( urllib . parse . parse_qs ( u2 . query ) == urllib . parse . parse_qs ( p2 . query ) )