mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-10 11:21:29 +00:00
Update code styles
This commit is contained in:
@@ -10,8 +10,6 @@ from django.conf import settings
|
|||||||
from seaserv import check_permission, is_repo_owner, ccnet_api
|
from seaserv import check_permission, is_repo_owner, ccnet_api
|
||||||
from seahub.utils import is_pro_version
|
from seahub.utils import is_pro_version
|
||||||
|
|
||||||
from seahub.utils import is_pro_version
|
|
||||||
|
|
||||||
SAFE_METHODS = ['GET', 'HEAD', 'OPTIONS']
|
SAFE_METHODS = ['GET', 'HEAD', 'OPTIONS']
|
||||||
|
|
||||||
class IsRepoWritable(BasePermission):
|
class IsRepoWritable(BasePermission):
|
||||||
|
@@ -26,7 +26,7 @@ class DefaultLibraryTest(BaseTestCase):
|
|||||||
json_resp = json.loads(resp.content)
|
json_resp = json.loads(resp.content)
|
||||||
|
|
||||||
assert json_resp['user_email'] == self.user_name
|
assert json_resp['user_email'] == self.user_name
|
||||||
assert json_resp['exists'] == False
|
assert json_resp['exists'] is False
|
||||||
|
|
||||||
def test_can_create(self):
|
def test_can_create(self):
|
||||||
self.login_as(self.admin)
|
self.login_as(self.admin)
|
||||||
@@ -40,7 +40,7 @@ class DefaultLibraryTest(BaseTestCase):
|
|||||||
new_default_repo_id = UserOptions.objects.get_default_repo(self.user_name)
|
new_default_repo_id = UserOptions.objects.get_default_repo(self.user_name)
|
||||||
|
|
||||||
assert json_resp['user_email'] == self.user_name
|
assert json_resp['user_email'] == self.user_name
|
||||||
assert json_resp['exists'] == True
|
assert json_resp['exists'] is True
|
||||||
assert json_resp['repo_id'] == new_default_repo_id
|
assert json_resp['repo_id'] == new_default_repo_id
|
||||||
|
|
||||||
def test_can_not_get_if_not_admin(self):
|
def test_can_not_get_if_not_admin(self):
|
||||||
|
Reference in New Issue
Block a user