mirror of
https://github.com/onionshare/onionshare.git
synced 2024-12-28 08:49:30 -05:00
Check for the (absence of) hyperlink in page markup before we move on to trying to download the individual file
This commit is contained in:
parent
f6eb80d5b5
commit
cb439743ff
@ -105,12 +105,12 @@ class GuiShareTest(GuiBaseTest):
|
|||||||
with open(tmp_file.name, 'r') as f:
|
with open(tmp_file.name, 'r') as f:
|
||||||
self.assertEqual('onionshare', f.read())
|
self.assertEqual('onionshare', f.read())
|
||||||
else:
|
else:
|
||||||
|
self.assertFalse('a href="/test.txt"' in r.text)
|
||||||
if public_mode:
|
if public_mode:
|
||||||
r = requests.get(download_file_url)
|
r = requests.get(download_file_url)
|
||||||
else:
|
else:
|
||||||
r = requests.get(download_file_url, auth=requests.auth.HTTPBasicAuth('onionshare', self.gui.share_mode.server_status.web.password))
|
r = requests.get(download_file_url, auth=requests.auth.HTTPBasicAuth('onionshare', self.gui.share_mode.server_status.web.password))
|
||||||
self.assertEqual(r.status_code, 404)
|
self.assertEqual(r.status_code, 404)
|
||||||
self.assertFalse('a href="/test.txt"' in r.text)
|
|
||||||
self.download_share(public_mode)
|
self.download_share(public_mode)
|
||||||
|
|
||||||
QtTest.QTest.qWait(2000)
|
QtTest.QTest.qWait(2000)
|
||||||
|
Loading…
Reference in New Issue
Block a user