diff options
author | drebs <drebs@leap.se> | 2013-05-21 20:33:48 -0300 |
---|---|---|
committer | drebs <drebs@leap.se> | 2013-05-21 21:42:56 -0300 |
commit | 6c1b204938109de29fa53cc4e445b822f622826d (patch) | |
tree | 457528cd657c4201fd9e9ca2c4c73976e1c0a73e /src/leap/soledad/tests/test_soledad.py | |
parent | b86442d9ae23b91e81bcfa2d82ed90638f849578 (diff) |
Improve _has_secret() logic and tests.
Diffstat (limited to 'src/leap/soledad/tests/test_soledad.py')
-rw-r--r-- | src/leap/soledad/tests/test_soledad.py | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/leap/soledad/tests/test_soledad.py b/src/leap/soledad/tests/test_soledad.py index 6a4261c0..45cd7eb2 100644 --- a/src/leap/soledad/tests/test_soledad.py +++ b/src/leap/soledad/tests/test_soledad.py @@ -64,14 +64,21 @@ class AuxMethodsTestCase(BaseSoledadTest): """ Test if configuration defaults point to the correct place. """ - sol = Soledad( - 'leap@leap.se', passphrase='123', - secrets_path=None, local_db_path=None, - server_url='', cert_file=None) # otherwise Soledad will fail. + + class SoledadMock(Soledad): + + def __init__(self): + pass + + # instantiate without initializing so we just test _init_config() + sol = SoledadMock() + Soledad._init_config(sol, None, None, '') + # assert value of secrets_path self.assertEquals( os.path.join( sol.DEFAULT_PREFIX, Soledad.STORAGE_SECRETS_FILE_NAME), sol.secrets_path) + # assert value of local_db_path self.assertEquals( os.path.join(sol.DEFAULT_PREFIX, 'soledad.u1db'), sol.local_db_path) |