summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMicah Lee <micah@micahflee.com>2020-08-21 18:37:15 -0400
committerMicah Lee <micah@micahflee.com>2020-08-21 18:37:15 -0400
commitf55588c08c20da6a2901c7f4cb4f1dd664b38849 (patch)
treeff6da004db4596bbfc8408cbde4a9bcd4a790847 /tests
parentcf61f3ba43b1cc6b2fdb88e891e081333f211989 (diff)
downloadonionshare-f55588c08c20da6a2901c7f4cb4f1dd664b38849.tar.gz
onionshare-f55588c08c20da6a2901c7f4cb4f1dd664b38849.zip
In web tests, allow mime-type to be either application/zip or application/x-zip-compressed
Diffstat (limited to 'tests')
-rw-r--r--tests/test_cli_web.py19
1 files changed, 15 insertions, 4 deletions
diff --git a/tests/test_cli_web.py b/tests/test_cli_web.py
index 2e7d427b..6c2e14a3 100644
--- a/tests/test_cli_web.py
+++ b/tests/test_cli_web.py
@@ -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):