@@ -47,16 +47,37 @@ def test_https_no_adblock_filters(self):
4747 except ConnectionError :
4848 pass # 99% blocked by external software
4949
50+ def test_http_adblock_blackhole (self , docker_privoxy , make_request , env_info ):
51+ resp = requests .get (f"http://{ env_info ['ip' ]} /@blackhole" )
52+ assert resp .status_code == 200
53+ mime_type = resp .headers .get ("Content-Type" )
54+ assert mime_type == "text/html"
55+ assert "adblock2privoxy" in resp .text
56+
57+ def test_https_adblock_blackhole (self , docker_privoxy , make_request , env_info ):
58+ resp = requests .get (
59+ f"https://{ env_info ['ip' ]} /@blackhole" ,
60+ verify = "./tests/privoxy-ca-bundle.crt" ,
61+ )
62+ assert resp .status_code == 200
63+ mime_type = resp .headers .get ("Content-Type" )
64+ assert mime_type == "text/html"
65+ assert "adblock2privoxy" in resp .text
66+
5067 def test_http_adblock_css_filters (self , docker_privoxy , make_request , env_info ):
5168 resp = requests .get (f"http://{ env_info ['ip' ]} /ab2p.common.css" )
5269 assert resp .status_code == 200
70+ mime_type = resp .headers .get ("Content-Type" )
71+ assert mime_type == "text/css"
5372
5473 def test_https_adblock_css_filters (self , docker_privoxy , make_request , env_info ):
5574 resp = requests .get (
5675 f"https://{ env_info ['ip' ]} /ab2p.common.css" ,
5776 verify = "./tests/privoxy-ca-bundle.crt" ,
5877 )
5978 assert resp .status_code == 200
79+ mime_type = resp .headers .get ("Content-Type" )
80+ assert mime_type == "text/css"
6081
6182 def test_http_privman_blocklist (self , docker_privoxy , make_request , exec_privman ):
6283 resp = exec_privman (docker_privoxy , "--add-blocklist" , ".google." )
0 commit comments