vdirsyncer/tests/storage/test_filesystem.py
Markus Unterwaditzer 03b6d11ac8 Deduplication
2014-03-09 17:08:07 +01:00

27 lines
727 B
Python

# -*- coding: utf-8 -*-
'''
vdirsyncer.tests.storage.filesystem
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2014 Markus Unterwaditzer
:license: MIT, see LICENSE for more details.
'''
from unittest import TestCase
import pytest
import os
from vdirsyncer.storage.filesystem import FilesystemStorage
from . import StorageTests
@pytest.mark.usefixtures('class_tmpdir')
class FilesystemStorageTests(TestCase, StorageTests):
storage_class = FilesystemStorage
def get_storage_args(self, collection=None):
path = self.tmpdir
if collection is not None:
path = os.path.join(path, collection)
os.makedirs(path)
return {'path': path, 'fileext': '.txt'}