mirror of
https://github.com/onionshare/onionshare.git
synced 2025-02-13 05:01:23 -05:00
In web tests, allow mime-type to be either application/zip or application/x-zip-compressed
This commit is contained in:
parent
cf61f3ba43
commit
f55588c08c
@ -93,7 +93,10 @@ class TestWeb:
|
|||||||
res = c.get("/download", headers=self._make_auth_headers(web.password))
|
res = c.get("/download", headers=self._make_auth_headers(web.password))
|
||||||
res.get_data()
|
res.get_data()
|
||||||
assert res.status_code == 200
|
assert res.status_code == 200
|
||||||
assert res.mimetype == "application/zip"
|
assert (
|
||||||
|
res.mimetype == "application/zip"
|
||||||
|
or res.mimetype == "application/x-zip-compressed"
|
||||||
|
)
|
||||||
|
|
||||||
def test_share_mode_autostop_sharing_on(self, temp_dir, common_obj, temp_file_1024):
|
def test_share_mode_autostop_sharing_on(self, temp_dir, common_obj, temp_file_1024):
|
||||||
web = web_obj(temp_dir, common_obj, "share", 3)
|
web = web_obj(temp_dir, common_obj, "share", 3)
|
||||||
@ -106,11 +109,16 @@ class TestWeb:
|
|||||||
res = c.get("/download", headers=self._make_auth_headers(web.password))
|
res = c.get("/download", headers=self._make_auth_headers(web.password))
|
||||||
res.get_data()
|
res.get_data()
|
||||||
assert res.status_code == 200
|
assert res.status_code == 200
|
||||||
assert res.mimetype == "application/zip"
|
assert (
|
||||||
|
res.mimetype == "application/zip"
|
||||||
|
or res.mimetype == "application/x-zip-compressed"
|
||||||
|
)
|
||||||
|
|
||||||
assert web.running == False
|
assert web.running == False
|
||||||
|
|
||||||
def test_share_mode_autostop_sharing_off(self, temp_dir, common_obj, temp_file_1024):
|
def test_share_mode_autostop_sharing_off(
|
||||||
|
self, temp_dir, common_obj, temp_file_1024
|
||||||
|
):
|
||||||
web = web_obj(temp_dir, common_obj, "share", 3)
|
web = web_obj(temp_dir, common_obj, "share", 3)
|
||||||
web.settings.set("share", "autostop_sharing", False)
|
web.settings.set("share", "autostop_sharing", False)
|
||||||
|
|
||||||
@ -121,7 +129,10 @@ class TestWeb:
|
|||||||
res = c.get("/download", headers=self._make_auth_headers(web.password))
|
res = c.get("/download", headers=self._make_auth_headers(web.password))
|
||||||
res.get_data()
|
res.get_data()
|
||||||
assert res.status_code == 200
|
assert res.status_code == 200
|
||||||
assert res.mimetype == "application/zip"
|
assert (
|
||||||
|
res.mimetype == "application/zip"
|
||||||
|
or res.mimetype == "application/x-zip-compressed"
|
||||||
|
)
|
||||||
assert web.running == True
|
assert web.running == True
|
||||||
|
|
||||||
def test_receive_mode(self, temp_dir, common_obj):
|
def test_receive_mode(self, temp_dir, common_obj):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user