def assert_url(first, second):
<EOL>scheme, netloc, path, query_string, fragment = urlsplit(first)<EOL>first = (scheme, netloc, path, parse_qs(query_string), fragment)<EOL>scheme, netloc, path, query_string, fragment = urlsplit(second)<EOL>second = (scheme, netloc, path, parse_qs(query_string), fragment)<EOL>assert first == second<EOL>
Compare first and second url.

Arguments:
    first (str) : first url.
    second (str) : second url.

Raises:
    Assertion error if both urls do not match.