@@ -750,11 +750,11 @@ def test_domain_filter():
750750
751751def test_urlcheck_redirects ():
752752 "Test redirection checks."
753- assert check_url ("https://www. httpbun.com/status/200 " , with_redirects = True ) == (
754- "https ://httpbun.com " ,
755- "httpbun.com " ,
753+ assert check_url ("https://httpbun.org/redirect-to?url=http%3A%2F%2Fexample.org " , with_redirects = True ) == (
754+ "http ://example.org " ,
755+ "example.org " ,
756756 )
757- assert check_url ("https://www.httpbin .org/status/404" , with_redirects = True ) is None
757+ assert check_url ("https://httpbun .org/status/404" , with_redirects = True ) is None
758758 assert check_url ("https://www.ht.or" , with_redirects = True ) is None
759759
760760
@@ -764,11 +764,11 @@ def test_urlutils():
764764 assert extract_domain ("" ) is None
765765 assert extract_domain (5 ) is None
766766 assert extract_domain ("h" ) is None
767- assert extract_domain ("https://httpbin .org/" ) == "httpbin .org"
768- assert extract_domain ("https://www.httpbin .org/" , fast = True ) == "httpbin .org"
767+ assert extract_domain ("https://httpbun .org/" ) == "httpbun .org"
768+ assert extract_domain ("https://www.httpbun .org/" , fast = True ) == "httpbun .org"
769769 assert extract_domain ("http://www.mkyong.com.au" , fast = True ) == "mkyong.com.au"
770770 assert extract_domain ("http://mkyong.t.t.co" , fast = True ) == "mkyong.t.t.co"
771- assert extract_domain ("ftp://www4.httpbin .org" , fast = True ) == "httpbin .org"
771+ assert extract_domain ("ftp://www4.httpbun .org" , fast = True ) == "httpbun .org"
772772 assert extract_domain ("http://w3.example.com" , fast = True ) == "example.com"
773773 assert extract_domain ("https://de.nachrichten.yahoo.com/" , fast = True ) == "yahoo.com"
774774 assert (
@@ -787,7 +787,7 @@ def test_urlutils():
787787 assert extract_domain ("http://example.com?query=one" , fast = True ) == "example.com"
788788 assert extract_domain ("http://example.com#fragment" , fast = True ) == "example.com"
789789 # url parsing
790- result = _parse ("https://httpbin .org/" )
790+ result = _parse ("https://httpbun .org/" )
791791 assert isinstance (result , SplitResult )
792792 newresult = _parse (result )
793793 assert isinstance (result , SplitResult )
@@ -803,9 +803,9 @@ def test_urlutils():
803803 )
804804 assert get_host_and_path ("https://example.org/" ) == ("https://example.org" , "/" )
805805 assert get_host_and_path ("https://example.org" ) == ("https://example.org" , "/" )
806- assert get_hostinfo ("https://httpbin .org/" ) == (
807- "httpbin .org" ,
808- "https://httpbin .org" ,
806+ assert get_hostinfo ("https://httpbun .org/" ) == (
807+ "httpbun .org" ,
808+ "https://httpbun .org" ,
809809 )
810810 assert get_hostinfo ("https://example.org/path" ) == (
811811 "example.org" ,
@@ -928,29 +928,29 @@ def test_extraction():
928928 # navigation
929929 pagecontent = "<html><head><title>Links</title></head><body><a href='/links/2/0'>0</a> <a href='/links/2/1'>1</a> </body></html>"
930930 links = extract_links (
931- pagecontent , "https://httpbin .org" , external_bool = False , with_nav = True
931+ pagecontent , "https://httpbun .org" , external_bool = False , with_nav = True
932932 )
933933 assert sorted (links ) == [
934- "https://httpbin .org/links/2/0" ,
935- "https://httpbin .org/links/2/1" ,
934+ "https://httpbun .org/links/2/0" ,
935+ "https://httpbun .org/links/2/1" ,
936936 ]
937937 links = extract_links (
938- pagecontent , url = "https://httpbin .org" , external_bool = False , with_nav = True
938+ pagecontent , url = "https://httpbun .org" , external_bool = False , with_nav = True
939939 )
940940 assert sorted (links ) == [
941- "https://httpbin .org/links/2/0" ,
942- "https://httpbin .org/links/2/1" ,
941+ "https://httpbun .org/links/2/0" ,
942+ "https://httpbun .org/links/2/1" ,
943943 ]
944944 pagecontent = "<html><head><title>Links</title></head><body><a href='links/2/0'>0</a> <a href='links/2/1'>1</a> </body></html>"
945945 links = extract_links (
946946 pagecontent ,
947- url = "https://httpbin .org/page1/" ,
947+ url = "https://httpbun .org/page1/" ,
948948 external_bool = False ,
949949 with_nav = True ,
950950 )
951951 assert sorted (links ) == [
952- "https://httpbin .org/page1/links/2/0" ,
953- "https://httpbin .org/page1/links/2/1" ,
952+ "https://httpbun .org/page1/links/2/0" ,
953+ "https://httpbun .org/page1/links/2/1" ,
954954 ]
955955 pagecontent = "<html><head><title>Pages</title></head><body><a href='/page/10'>10</a> <a href='/page/?=11'>11</a></body></html>"
956956 assert (
@@ -1186,8 +1186,8 @@ def test_examples():
11861186 "test.net" ,
11871187 )
11881188 assert check_url (
1189- "https://httpbin .org/redirect-to?url=http%3A%2F%2Fexample.org" , strict = True
1190- ) == ("https://httpbin .org/redirect-to" , "httpbin .org" )
1189+ "https://httpbun .org/redirect-to?url=http%3A%2F%2Fexample.org" , strict = True
1190+ ) == ("https://httpbun .org/redirect-to" , "httpbun .org" )
11911191 assert clean_url ("HTTPS://WWW.DWDS.DE:80/" ) == "https://www.dwds.de"
11921192 assert validate_url ("http://1234" ) == (False , None )
11931193 assert validate_url ("http://www.example.org/" )[0 ] is True
0 commit comments