Fix tests for public_mode

This commit is contained in:
Miguel Jacq 2018-07-22 14:58:14 +10:00
parent 3b45f93dbe
commit a13e98d7bb
No known key found for this signature in database
GPG Key ID: EEA4341C6D97A0B6
2 changed files with 5 additions and 5 deletions

View File

@ -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):

View File

@ -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