view MoinMoin/storage/backends/_tests/ @ 1974:87272c032485

remove unused imports
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 10 Feb 2013 23:54:13 +0100
parents 4ac437141bbe
children 181a556a0920
line wrap: on
line source
# Copyright: 2011 MoinMoin:ThomasWaldmann
# License: GNU GPL v2 (or any later version), see LICENSE.txt for details.

MoinMoin - stores backend tests

Note: theoretically, it should be enough to test with one kind of store,
      but we better test with a fs AND a memory store.

from __future__ import absolute_import, division

from ..stores import MutableBackend
from . import MutableBackendTestBase

from import BytesStore as MemoryBytesStore
from import FileStore as MemoryFileStore

class TestMemoryBackend(MutableBackendTestBase):
    def setup_method(self, method):
        meta_store = MemoryBytesStore()
        data_store = MemoryFileStore() = MutableBackend(meta_store, data_store)

import os
import tempfile

from import BytesStore as FSBytesStore
from import FileStore as FSFileStore

class TestFSBackend(MutableBackendTestBase):
    def setup_method(self, method):
        meta_path = tempfile.mkdtemp()
        meta_store = FSBytesStore(meta_path)
        data_path = tempfile.mkdtemp()
        data_store = FSFileStore(data_path) = MutableBackend(meta_store, data_store)