Test w-prefixed shortener detection

This commit is contained in:
besendorf authored and GitHub committed 2026-09-24 04:29:33 -07:00
1 parent c399608345
commit 3bb652f2d2
1 file changed
+5
+5
View File
@@ -37,3 +37,8 @@ def test_other_google_short_url_is_shortened():
) )
def test_get_domain_strips_only_a_whole_www_prefix(url, domain): def test_get_domain_strips_only_a_whole_www_prefix(url, domain):
assert URL(url).domain == domain assert URL(url).domain == domain
def test_shortener_starting_with_w_is_detected():
assert URL("https://w3t.org/example").check_if_shortened() is True
assert URL("https://www.w3t.org/example").check_if_shortened() is True