1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-06 17:33:18 +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,7 @@ from django.core.urlresolvers import reverse
from seahub.api2.endpoints.admin import license as license_api
from seahub.settings import LICENSE_PATH
from seahub.utils.error_msg import file_type_error_msg
from seahub.test_utils import BaseTestCase
from tests.common.utils import urljoin
from tests.common.common import BASE_URL
@@ -42,5 +43,5 @@ class AdminLicenseTest(BaseTestCase):
resp = self.client.post(url, {'license': f})
json_resp = json.loads(resp.content)
assert 400 == resp.status_code
assert "Filetype not allowed." == json_resp['error_msg']
assert file_type_error_msg('notxt', 'txt') == json_resp['error_msg']