mirror of
https://github.com/onionshare/onionshare.git
synced 2025-01-13 16:29:31 -05:00
Test to make sure that we *can't* download an individual file when not in stay_open mode, not just that the hyperlink is not present in the page markup
This commit is contained in:
parent
273b893946
commit
f6eb80d5b5
@ -105,6 +105,11 @@ class GuiShareTest(GuiBaseTest):
|
||||
with open(tmp_file.name, 'r') as f:
|
||||
self.assertEqual('onionshare', f.read())
|
||||
else:
|
||||
if public_mode:
|
||||
r = requests.get(download_file_url)
|
||||
else:
|
||||
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.assertFalse('a href="/test.txt"' in r.text)
|
||||
self.download_share(public_mode)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user