1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-08 18:30:53 +00:00

[tests] Fix django_constance in tests

Conflicts:
	tests/seahub/notifications/management/commands/test_notify_admins_on_virus.py
This commit is contained in:
zhengxie
2018-03-21 13:54:14 +08:00
parent aa689f9bfe
commit 1cc0d09775
19 changed files with 159 additions and 88 deletions

View File

@@ -6,7 +6,8 @@ import json
import time
import pytest
import uuid
from constance import config
import pytest
pytestmark = pytest.mark.django_db
from django.core.urlresolvers import reverse
from seaserv import seafile_api
@@ -163,7 +164,11 @@ class NewReposApiTest(BaseTestCase):
def setUp(self):
self.clear_cache()
self.login_as(self.admin)
config.ENABLE_ENCRYPTED_LIBRARY = True
from constance import config
self.config = config
self.config.ENABLE_ENCRYPTED_LIBRARY = True
def test_create_encrypted_repo(self):
"""Test create an encrypted repo with the secure keys generated on client
@@ -198,7 +203,7 @@ class NewReposApiTest(BaseTestCase):
"""Test create an encrypted repo with the secure keys generated on client
side.
"""
config.ENABLE_ENCRYPTED_LIBRARY = False
self.config.ENABLE_ENCRYPTED_LIBRARY = False
repo_id = str(uuid.uuid4())
password = randstring(16)
enc_version = 2