summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordrebs <drebs@leap.se>2013-04-03 14:28:07 -0300
committerdrebs <drebs@leap.se>2013-04-03 14:28:07 -0300
commitd547d8e465d28838249e2576b598f009d0000333 (patch)
tree4f407fcd6d7e750a497561e5766e105270619a6e
parent3fffd731552426c67d1255fd5ba3b4a36964efe4 (diff)
parent138bf574406b6533e0eeb59a7a19b0edeb97e9b7 (diff)
Merge branch 'feature/pysqlcipher-dependency' into develop
-rw-r--r--setup.py15
-rw-r--r--src/leap/soledad/__init__.py4
-rw-r--r--src/leap/soledad/shared_db.py2
-rw-r--r--src/leap/soledad/tests/__init__.py2
-rw-r--r--src/leap/soledad/tests/test_crypto.py2
-rw-r--r--src/leap/soledad/tests/test_sqlcipher.py2
6 files changed, 17 insertions, 10 deletions
diff --git a/setup.py b/setup.py
index 3ecb29d3..ff206571 100644
--- a/setup.py
+++ b/setup.py
@@ -11,9 +11,15 @@ install_requirements = [
'couchdb',
'configparser',
'simplejson',
- 'pysqlite',
- # TODO: add dependency for leap client ?
- # TODO: add dependency for pysqlcipher.
+ 'pysqlcipher',
+ 'leap.common',
+]
+
+
+# TODO: change below so we get stable versions of modules.
+dependency_links = [
+ 'git+git://git.futeisha.org/pysqlcipher.git@develop#egg=pysqlcipher',
+ 'git+ssh://code.leap.se/leap_pycommon.git@develop#egg=leap_pycommon',
]
@@ -43,5 +49,6 @@ setup(
package_dir = {'': 'src'},
test_suite='nose2.collector.collector',
install_requires=install_requirements,
- tests_requires=tests_requirements,
+ tests_require=tests_requirements,
+ dependency_links=dependency_links
)
diff --git a/src/leap/soledad/__init__.py b/src/leap/soledad/__init__.py
index f79e1c31..bd5a351c 100644
--- a/src/leap/soledad/__init__.py
+++ b/src/leap/soledad/__init__.py
@@ -72,7 +72,7 @@ class Soledad(object):
config_file=None, shared_db_url=None, auth_token=None,
bootstrap=True):
"""
- Initialize crypto and dbs.
+ Initialize configuration, cryptographic keys and dbs.
:param user_email: Email address of the user (username@provider).
:param prefix: Path to use as prefix for files.
@@ -380,7 +380,7 @@ class Soledad(object):
passphrase=self._user_hash())
remote_symkey = self.decrypt(doc.content['_symkey'])
result = self._gpg.import_keys(remote_privkey)
- # TODO: is the following behaviour expected in any scenario?
+ # TODO: is the following behaviour not expected in any scenario?
assert result.fingerprints[0] == self._fingerprint
assert remote_symkey == self._symkey
else:
diff --git a/src/leap/soledad/shared_db.py b/src/leap/soledad/shared_db.py
index 27018701..275ed269 100644
--- a/src/leap/soledad/shared_db.py
+++ b/src/leap/soledad/shared_db.py
@@ -32,7 +32,7 @@ class Unauthorized(Exception):
class SoledadSharedDatabase(http_database.HTTPDatabase):
"""
- This is a shared HTTP database that holds users' encrypted keys.
+ This is a shared remote database that holds users' encrypted keys.
An authorization token is attached to every request other than
get_doc_unauth, which has the purpose of retrieving encrypted content from
diff --git a/src/leap/soledad/tests/__init__.py b/src/leap/soledad/tests/__init__.py
index 1ed2e248..8ceafe99 100644
--- a/src/leap/soledad/tests/__init__.py
+++ b/src/leap/soledad/tests/__init__.py
@@ -6,7 +6,7 @@ import u1db
from leap.soledad import Soledad
from leap.soledad.util import GPGWrapper
from leap.soledad.backends.leap_backend import LeapDocument
-from leap.testing.basetest import BaseLeapTest
+from leap.common.testing.basetest import BaseLeapTest
#-----------------------------------------------------------------------------
diff --git a/src/leap/soledad/tests/test_crypto.py b/src/leap/soledad/tests/test_crypto.py
index 52cc0315..a92e2c46 100644
--- a/src/leap/soledad/tests/test_crypto.py
+++ b/src/leap/soledad/tests/test_crypto.py
@@ -1,5 +1,5 @@
import os
-from leap.testing.basetest import BaseLeapTest
+from leap.common.testing.basetest import BaseLeapTest
from leap.soledad.backends.leap_backend import LeapDocument
from leap.soledad.tests import BaseSoledadTest
from leap.soledad.tests import (
diff --git a/src/leap/soledad/tests/test_sqlcipher.py b/src/leap/soledad/tests/test_sqlcipher.py
index 7b8f6298..23847556 100644
--- a/src/leap/soledad/tests/test_sqlcipher.py
+++ b/src/leap/soledad/tests/test_sqlcipher.py
@@ -30,7 +30,7 @@ from leap.soledad.tests.u1db_tests import test_backends
from leap.soledad.tests.u1db_tests import test_open
from leap.soledad.tests.u1db_tests import test_sync
from leap.soledad.backends.leap_backend import LeapSyncTarget
-from leap.testing.basetest import BaseLeapTest
+from leap.common.testing.basetest import BaseLeapTest
PASSWORD = '123456'