summaryrefslogtreecommitdiff
path: root/src/leap/soledad/tests/test_soledad.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap/soledad/tests/test_soledad.py')
-rw-r--r--src/leap/soledad/tests/test_soledad.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/leap/soledad/tests/test_soledad.py b/src/leap/soledad/tests/test_soledad.py
index 45cd7eb2..1c0e6d4a 100644
--- a/src/leap/soledad/tests/test_soledad.py
+++ b/src/leap/soledad/tests/test_soledad.py
@@ -24,10 +24,7 @@ Tests for general Soledad functionality.
import os
import re
import tempfile
-try:
- import simplejson as json
-except ImportError:
- import json # noqa
+import simplejson as json
from leap.common.testing.basetest import BaseLeapTest
@@ -41,7 +38,7 @@ from leap.soledad.backends.leap_backend import LeapDocument
class AuxMethodsTestCase(BaseSoledadTest):
def test__init_dirs(self):
- sol = self._soledad_instance(prefix='/_init_dirs')
+ sol = self._soledad_instance(prefix='_init_dirs')
sol._init_dirs()
local_db_dir = os.path.dirname(sol.local_db_path)
secrets_path = os.path.dirname(sol.secrets_path)
@@ -94,8 +91,12 @@ class AuxMethodsTestCase(BaseSoledadTest):
local_db_path='value_2',
server_url='value_1',
cert_file=None)
- self.assertEqual(self.tempdir+'value_3', sol.secrets_path)
- self.assertEqual(self.tempdir+'value_2', sol.local_db_path)
+ self.assertEqual(
+ os.path.join(self.tempdir, 'value_3'),
+ sol.secrets_path)
+ self.assertEqual(
+ os.path.join(self.tempdir, 'value_2'),
+ sol.local_db_path)
self.assertEqual('value_1', sol.server_url)