1
0
Fork 0
mirror of https://github.com/Kozea/Radicale.git synced 2025-09-15 20:36:55 +00:00

Allow attach custom storage backend

This commit is contained in:
Sergey Fursov 2013-12-28 14:15:35 +04:00
parent a91a7790c5
commit 3b0328ca1e
6 changed files with 66 additions and 6 deletions

View file

@ -123,6 +123,25 @@ class GitMultiFileSystem(GitFileSystem, MultiFileSystem):
"""Base class for multifilesystem tests using Git"""
class CustomStorageSystem(BaseTest):
"""Base class for custom backend tests."""
storage_type = "custom"
def setup(self):
"""Setup function for each test."""
self.colpath = tempfile.mkdtemp()
config.set("storage", "type", self.storage_type)
config.set("storage", "custom_handler", "tests.custom.storage")
from tests.custom import storage
storage.FOLDER = self.colpath
storage.GIT_REPOSITORY = None
self.application = radicale.Application()
def teardown(self):
"""Teardown function for each test."""
shutil.rmtree(self.colpath)
class AuthSystem(BaseTest):
"""Base class to test Radicale with Htpasswd authentication"""
def setup(self):