mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-07-23 23:10:49 -04:00
have _warcprox_write_record also raise ProxyError when appropriate, and test this
This commit is contained in:
parent
ac972d399f
commit
5603ff5380
3 changed files with 12 additions and 1 deletions
|
@ -146,6 +146,15 @@ def test_proxy_down():
|
|||
with pytest.raises(brozzler.ProxyError):
|
||||
worker._fetch_url(site, page)
|
||||
|
||||
# WARCPROX_WRITE_RECORD
|
||||
with pytest.raises(brozzler.ProxyError):
|
||||
worker._warcprox_write_record(
|
||||
warcprox_address=not_listening_proxy,
|
||||
url='test://proxy_down/warcprox_write_record',
|
||||
warc_type='metadata',
|
||||
content_type='text/plain',
|
||||
payload=b'''payload doesn't matter here''')
|
||||
|
||||
def test_start_stop_backwards_compat():
|
||||
site = brozzler.Site(None, {'seed': 'http://example.com/'})
|
||||
assert len(site.starts_and_stops) == 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue