1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-01 07:01:12 +00:00

[tests] Fix tests

This commit is contained in:
zhengxie
2016-02-17 16:17:00 +08:00
parent 602355381f
commit 7e81ad7356
4 changed files with 30 additions and 30 deletions

View File

@@ -14,7 +14,7 @@ class RepoPublicTest(BaseTestCase):
self.url = '/api2/repos/%s/public/' % self.repo_id
self.user_repo_url = '/api2/repos/%s/public/' % self.repo.id
config.ENABLE_ORGANIZATION_LIBRARY = 1
config.ENABLE_USER_CREATE_ORG_REPO = 1
def tearDown(self):
self.remove_repo(self.repo_id)
@@ -46,9 +46,9 @@ class RepoPublicTest(BaseTestCase):
assert json_resp['success'] is True
def test_admin_can_set_pub_repo_when_setting_disalbed(self):
assert bool(config.ENABLE_ORGANIZATION_LIBRARY) is True
config.ENABLE_ORGANIZATION_LIBRARY = False
assert bool(config.ENABLE_ORGANIZATION_LIBRARY) is False
assert bool(config.ENABLE_USER_CREATE_ORG_REPO) is True
config.ENABLE_USER_CREATE_ORG_REPO = False
assert bool(config.ENABLE_USER_CREATE_ORG_REPO) is False
self.login_as(self.admin)
@@ -58,9 +58,9 @@ class RepoPublicTest(BaseTestCase):
assert json_resp['success'] is True
def test_user_can_not_set_pub_repo_when_setting_disalbed(self):
assert bool(config.ENABLE_ORGANIZATION_LIBRARY) is True
config.ENABLE_ORGANIZATION_LIBRARY = False
assert bool(config.ENABLE_ORGANIZATION_LIBRARY) is False
assert bool(config.ENABLE_USER_CREATE_ORG_REPO) is True
config.ENABLE_USER_CREATE_ORG_REPO = False
assert bool(config.ENABLE_USER_CREATE_ORG_REPO) is False
self.login_as(self.user)