Added ability to add host to blocked table if visit count is exceeded
This commit is contained in:
@@ -13,7 +13,15 @@ def test_proxy_block_page():
|
||||
requests.get("http://httpbin.org", proxies={"http": http_proxy})
|
||||
assert requests.get("http://httpbin.org", proxies={"http": http_proxy}).status_code == 403
|
||||
|
||||
# TODO - Use a sqlite driver here to check that httpbin.org is in the blocked table.
|
||||
# Or mock the sqlite client.
|
||||
|
||||
def test_blocked_file():
|
||||
"""
|
||||
Tests that the host configured to be blocked is successfully blocked.
|
||||
|
||||
TODO - Mock the blocked file to be used by the proxy to not have to hardcode the host.
|
||||
"""
|
||||
resp = requests.get("http://wikipedia.org", proxies={"http": http_proxy})
|
||||
assert resp.status_code == 403
|
||||
|
||||
Reference in New Issue
Block a user