1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-01 07:01:12 +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

@@ -2,7 +2,10 @@
"""
import json
from mock import patch
from constance import config
import pytest
pytestmark = pytest.mark.django_db
from django.core.urlresolvers import reverse
from django.template.defaultfilters import filesizeformat
@@ -18,6 +21,9 @@ class RepoTest(BaseTestCase):
self.url = reverse('api2-repos')
self.repo_id = self.repo
from constance import config
self.config = config
def test_can_fetch(self):
self.login_as(self.user)
@@ -189,7 +195,7 @@ class RepoTest(BaseTestCase):
self.remove_repo(share_repo.id)
def test_can_get_share_group_repo(self):
config.ENABLE_SHARE_TO_ALL_GROUPS = True
self.config.ENABLE_SHARE_TO_ALL_GROUPS = True
self.logout()
self.login_as(self.admin)