mirror of
https://github.com/onionshare/onionshare.git
synced 2024-12-29 01:06:16 -05:00
Fix tests for public_mode
This commit is contained in:
parent
3b45f93dbe
commit
a13e98d7bb
@ -66,7 +66,7 @@ class TestSettings:
|
||||
'hidservauth_string': '',
|
||||
'downloads_dir': os.path.expanduser('~/OnionShare'),
|
||||
'receive_allow_receiver_shutdown': True,
|
||||
'receive_public_mode': False
|
||||
'public_mode': False
|
||||
}
|
||||
|
||||
def test_fill_in_defaults(self, settings_obj):
|
||||
|
@ -168,9 +168,9 @@ class TestWeb:
|
||||
assert res.status_code == 302
|
||||
assert web.running == True
|
||||
|
||||
def test_receive_mode_receive_public_mode_on(self, common_obj):
|
||||
def test_public_mode_on(self, common_obj):
|
||||
web = web_obj(common_obj, True)
|
||||
common_obj.settings.set('receive_public_mode', True)
|
||||
common_obj.settings.set('public_mode', True)
|
||||
|
||||
with web.app.test_client() as c:
|
||||
# Upload page should be accessible from both / and /[slug]
|
||||
@ -182,9 +182,9 @@ class TestWeb:
|
||||
data2 = res.get_data()
|
||||
assert res.status_code == 200
|
||||
|
||||
def test_receive_mode_receive_public_mode_off(self, common_obj):
|
||||
def test_public_mode_off(self, common_obj):
|
||||
web = web_obj(common_obj, True)
|
||||
common_obj.settings.set('receive_public_mode', False)
|
||||
common_obj.settings.set('public_mode', False)
|
||||
|
||||
with web.app.test_client() as c:
|
||||
# / should be a 404
|
||||
|
Loading…
Reference in New Issue
Block a user