fnp
/
redakcja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Unobtrusive reminder about unsaved changes in document.
[redakcja.git]
/
apps
/
wiki
/
tests.py
diff --git
a/apps/wiki/tests.py
b/apps/wiki/tests.py
index
4262d20
..
6577737
100644
(file)
--- a/
apps/wiki/tests.py
+++ b/
apps/wiki/tests.py
@@
-1,12
+1,19
@@
-import unittest
+from nose.tools import *
import wiki.models as models
import wiki.models as models
+import shutil
+import tempfile
-class TestDocument(unittest.TestCase):
+class TestStorageBase:
def setUp(self):
def setUp(self):
- models.storage = None
+ self.dirpath = tempfile.mkdtemp(prefix='nosetest_')
- def
+ def tearDown(self):
+ shutil.rmtree(self.dirpath)
+class TestDocumentStorage(TestStorageBase):
+ def test_storage_empty(self):
+ storage = models.DocumentStorage(self.dirpath)
+ eq_(storage.all(), [])