X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/7094d00cd82535cfd1db00e7bd85e2a01161da83..07689901a9bf30daeccf8a1ceb7193fe771eb3ac:/apps/wiki_img/tests.py?ds=sidebyside diff --git a/apps/wiki_img/tests.py b/apps/wiki_img/tests.py new file mode 100644 index 00000000..65777379 --- /dev/null +++ b/apps/wiki_img/tests.py @@ -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(), [])