Librarian in regular requirements.
[redakcja.git] / apps / wiki_img / tests.py
1 from nose.tools import *
2 import wiki.models as models
3 import shutil
4 import tempfile
5
6
7 class TestStorageBase:
8     def setUp(self):
9         self.dirpath = tempfile.mkdtemp(prefix='nosetest_')
10
11     def tearDown(self):
12         shutil.rmtree(self.dirpath)
13
14
15 class TestDocumentStorage(TestStorageBase):
16
17     def test_storage_empty(self):
18         storage = models.DocumentStorage(self.dirpath)
19         eq_(storage.all(), [])