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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user