-import unittest
+from nose.tools import *
import wiki.models as models
+import shutil, tempfile
-class TestDocument(unittest.TestCase):
-
+class TestStorageBase:
def setUp(self):
- models.storage = None
+ self.dirpath = tempfile.mkdtemp(prefix = 'nosetest_')
+
+ def tearDown(self):
+ shutil.rmtree(self.dirpath)
+
+class TestDocumentStorage(TestStorageBase):
+
+ def test_storage_empty(self):
+ storage = models.DocumentStorage(self.dirpath)
+ eq_(storage.all(), [])
- def
#
# COMPRESS_CSS_FILTERS = None
+
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
)
TEST_RUNNER = 'django_nose.run_tests'
+TEST_MODULES = ('wiki', 'toolbar', 'vstorage')
+NOSE_ARGS = (
+ '--tests=' + ','.join(TEST_MODULES),
+ '--cover-package=' + ','.join(TEST_MODULES),
+ '-d',
+ '--with-coverage',
+ '--with-doctest'
+)
FILEBROWSER_URL_FILEBROWSER_MEDIA = STATIC_URL + 'filebrowser/'