total mess: some random experiments with images and lqc's dvcs
[redakcja.git] / apps / wiki_img / tests.py
diff --git a/apps/wiki_img/tests.py b/apps/wiki_img/tests.py
new file mode 100644 (file)
index 0000000..6577737
--- /dev/null
@@ -0,0 +1,19 @@
+from nose.tools import *
+import wiki.models as models
+import shutil
+import tempfile
+
+
+class TestStorageBase:
+    def setUp(self):
+        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(), [])