mirror of
https://github.com/onionshare/onionshare.git
synced 2025-01-25 10:42:58 -03: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
1 changed files with 5 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue