summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordrebs <drebs@leap.se>2013-03-12 16:14:02 -0300
committerdrebs <drebs@leap.se>2013-03-12 16:14:02 -0300
commit708803f3a8b40263ccb3061e320010e35f218474 (patch)
treeb65307513f4a2966abc6e041e16580e1b4b335c8
parent1b7573280c5f6a8fc95170013cb7b29845e99a9e (diff)
Add test for _init_dirs().
-rw-r--r--src/leap/soledad/tests/test_crypto.py (renamed from src/leap/soledad/tests/test_encrypted.py)25
1 files changed, 24 insertions, 1 deletions
diff --git a/src/leap/soledad/tests/test_encrypted.py b/src/leap/soledad/tests/test_crypto.py
index b4821cf4..ca7502af 100644
--- a/src/leap/soledad/tests/test_encrypted.py
+++ b/src/leap/soledad/tests/test_crypto.py
@@ -1,6 +1,11 @@
+import os
+from leap.testing.basetest import BaseLeapTest
from leap.soledad.backends.leap_backend import LeapDocument
from leap.soledad.tests import BaseSoledadTest
-from leap.soledad.tests import KEY_FINGERPRINT
+from leap.soledad.tests import (
+ KEY_FINGERPRINT,
+ PRIVATE_KEY,
+)
from leap.soledad import (
Soledad,
KeyAlreadyExists,
@@ -136,3 +141,21 @@ class RecoveryDocumentTestCase(BaseSoledadTest):
pk2,
'Failed settinng private key.'
)
+
+
+class SoledadAuxMethods(BaseLeapTest):
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def _soledad_instance(self):
+ return Soledad('leap@leap.se', bootstrap=False,
+ prefix=self.tempdir+'/soledad')
+
+ def test__init_dirs(self):
+ sol = self._soledad_instance()
+ sol._init_dirs()
+ self.assertTrue(os.path.isdir(sol.prefix))