Merge branch 'develop' into receiver-mode-gui

This commit is contained in:
Micah Lee 2018-09-14 18:59:36 -07:00
commit 8312058fcc
No known key found for this signature in database
GPG key ID: 403C2657CD994F73
25 changed files with 523 additions and 634 deletions

View file

@ -61,7 +61,7 @@ def web_obj(common_obj, receive_mode, num_files=0):
# Receive mode
else:
pass
return web
@ -89,7 +89,7 @@ class TestWeb:
res.get_data()
assert res.status_code == 200
assert res.mimetype == 'application/zip'
def test_share_mode_close_after_first_download_on(self, common_obj, temp_file_1024):
web = web_obj(common_obj, False, 3)
web.stay_open = False
@ -104,7 +104,7 @@ class TestWeb:
assert res.mimetype == 'application/zip'
assert web.running == False
def test_share_mode_close_after_first_download_off(self, common_obj, temp_file_1024):
web = web_obj(common_obj, False, 3)
web.stay_open = True
@ -118,7 +118,7 @@ class TestWeb:
assert res.status_code == 200
assert res.mimetype == 'application/zip'
assert web.running == True
def test_receive_mode(self, common_obj):
web = web_obj(common_obj, True)
assert web.receive_mode is True
@ -137,7 +137,7 @@ class TestWeb:
res = c.get('/{}'.format(web.slug))
res.get_data()
assert res.status_code == 200
def test_receive_mode_allow_receiver_shutdown_on(self, common_obj):
web = web_obj(common_obj, True)
@ -152,7 +152,7 @@ class TestWeb:
# Should return ok, and server should stop
assert res.status_code == 200
assert web.running == False
def test_receive_mode_allow_receiver_shutdown_off(self, common_obj):
web = web_obj(common_obj, True)
@ -167,7 +167,7 @@ class TestWeb:
# Should redirect to index, and server should still be running
assert res.status_code == 302
assert web.running == True
def test_receive_mode_receive_public_mode_on(self, common_obj):
web = web_obj(common_obj, True)
common_obj.settings.set('receive_public_mode', True)
@ -181,7 +181,7 @@ class TestWeb:
res = c.get('/{}'.format(web.slug))
data2 = res.get_data()
assert res.status_code == 200
def test_receive_mode_receive_public_mode_off(self, common_obj):
web = web_obj(common_obj, True)
common_obj.settings.set('receive_public_mode', False)