diff options
Diffstat (limited to 'common/src/leap/soledad/common/tests/util.py')
-rw-r--r-- | common/src/leap/soledad/common/tests/util.py | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/common/src/leap/soledad/common/tests/util.py b/common/src/leap/soledad/common/tests/util.py index f7a2bd4e..df405010 100644 --- a/common/src/leap/soledad/common/tests/util.py +++ b/common/src/leap/soledad/common/tests/util.py @@ -31,6 +31,7 @@ import subprocess import time import re import traceback +from uuid import uuid4 from mock import Mock from urlparse import urljoin @@ -175,14 +176,16 @@ class MockedSharedDBTest(object): def soledad_sync_target(test, path): - return http_target.SoledadSyncTarget( - test.getURL(path), crypto=test._soledad._crypto) - - -def token_soledad_sync_target(test, path): - st = soledad_sync_target(test, path) - st.set_token_credentials('user-uuid', 'auth-token') - return st + creds = {'token': { + 'uuid': 'user-uuid', + 'token': 'auth-token', + }} + return http_target.SoledadHTTPSyncTarget( + test.getURL(path), + uuid4().hex, + creds, + test._soledad._crypto, + None) class BaseSoledadTest(BaseLeapTest, MockedSharedDBTest): |