mirror of
https://github.com/onionshare/onionshare.git
synced 2025-05-04 23:45:04 -04:00
In web tests, allow mime-type to be either application/zip or application/x-zip-compressed
This commit is contained in:
parent
8abf2f946a
commit
4c6237440a
1 changed files with 15 additions and 4 deletions
|
@ -93,7 +93,10 @@ class TestWeb:
|
|||
res = c.get("/download", headers=self._make_auth_headers(web.password))
|
||||
res.get_data()
|
||||
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):
|
||||
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.get_data()
|
||||
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
|
||||
|
||||
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.settings.set("share", "autostop_sharing", False)
|
||||
|
||||
|
@ -121,7 +129,10 @@ class TestWeb:
|
|||
res = c.get("/download", headers=self._make_auth_headers(web.password))
|
||||
res.get_data()
|
||||
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
|
||||
|
||||
def test_receive_mode(self, temp_dir, common_obj):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue