We've had a couple issues with our selenium tests asserting the equality of links such as www.google.com and www.google.com/. There are techniques to normalize URLs before comparing them. We should attempt to leverage this so we can do the following:
assert url_norm('www.google.com') == url_norm('www.google.com/') # most common case
assert url_norm('http://www.google.com') == url_norm('google.com')
...
We've had a couple issues with our selenium tests asserting the equality of links such as
www.google.com
andwww.google.com/
. There are techniques to normalize URLs before comparing them. We should attempt to leverage this so we can do the following:Reading on URL normalization here: https://en.wikipedia.org/wiki/URI_normalization I'm sure there are some Python packages that can do normalization to the extent we need.