mirror of
https://github.com/onionshare/onionshare.git
synced 2025-07-28 00:55:40 -04:00
Fix conflict in tests
This commit is contained in:
commit
8bb75cc530
40 changed files with 548 additions and 803 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue