1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-09 10:50:24 +00:00

license file type invalid && update test

This commit is contained in:
zming
2018-01-10 18:49:55 +08:00
parent 4b7ec9de27
commit 0affd2fc1f
5 changed files with 15 additions and 5 deletions

View File

@@ -5,6 +5,9 @@ from tests.common.common import BASE_URL
from django.core.urlresolvers import reverse
from seahub.test_utils import BaseTestCase
from seahub.utils import PREVIEW_FILEEXT
from seahub.utils.file_types import IMAGE
from seahub.utils.error_msg import file_type_error_msg
from seahub.settings import MEDIA_ROOT, CUSTOM_FAVICON_PATH
class AdminFaviconTest(BaseTestCase):
@@ -58,4 +61,4 @@ class AdminFaviconTest(BaseTestCase):
resp = self.client.post(logo_url, {'favicon': f})
json_resp = json.loads(resp.content)
assert resp.status_code == 400
assert json_resp['error_msg'] == "Filetype not allowed."
assert json_resp['error_msg'] == file_type_error_msg('noico', PREVIEW_FILEEXT.get(IMAGE))