mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-04-20 23:56:34 -04:00
add 401 url
This commit is contained in:
parent
2f5deab2c6
commit
74551f77ab
@ -62,6 +62,10 @@ def httpd(request):
|
||||
self.send_header('Content-Length', len(payload))
|
||||
self.end_headers()
|
||||
self.wfile.write(payload)
|
||||
elif self.path == '/401':
|
||||
self.send_response(401, 'Unauthorized')
|
||||
self.send_header('Connection', 'close')
|
||||
self.end_headers()
|
||||
else:
|
||||
super().do_GET()
|
||||
|
||||
@ -113,9 +117,10 @@ def test_aw_snap_hes_dead_jim():
|
||||
|
||||
def test_page_interstitial_exception():
|
||||
chrome_exe = brozzler.suggest_default_chrome_exe()
|
||||
url = 'http://localhost:%s/401' % httpd.server_port
|
||||
with brozzler.Browser(chrome_exe=chrome_exe) as browser:
|
||||
with pytest.raises(brozzler.PageInterstitialShown):
|
||||
browser.browse_page('https://monitor.archive.org/cgi-bin/nagios3/status.cgi?hostgroup=38.wbgrp')
|
||||
browser.browse_page(url)
|
||||
|
||||
def test_on_response(httpd):
|
||||
response_urls = []
|
||||
|
Loading…
x
Reference in New Issue
Block a user