summaryrefslogtreecommitdiff
path: root/common/src/leap
diff options
context:
space:
mode:
Diffstat (limited to 'common/src/leap')
-rw-r--r--common/src/leap/soledad/common/errors.py5
-rw-r--r--common/src/leap/soledad/common/tests/test_soledad.py12
2 files changed, 11 insertions, 6 deletions
diff --git a/common/src/leap/soledad/common/errors.py b/common/src/leap/soledad/common/errors.py
index f285cc77..5798770b 100644
--- a/common/src/leap/soledad/common/errors.py
+++ b/common/src/leap/soledad/common/errors.py
@@ -51,6 +51,11 @@ class SoledadError(errors.U1DBError):
# Authorization errors
#
+
+class DatabaseAccessError(Exception):
+ pass
+
+
@register_exception
class InvalidAuthTokenError(errors.Unauthorized):
diff --git a/common/src/leap/soledad/common/tests/test_soledad.py b/common/src/leap/soledad/common/tests/test_soledad.py
index 1217b763..c8bcaba1 100644
--- a/common/src/leap/soledad/common/tests/test_soledad.py
+++ b/common/src/leap/soledad/common/tests/test_soledad.py
@@ -27,7 +27,7 @@ from leap.soledad.common.tests.util import (
)
from leap import soledad
from leap.soledad.common.document import SoledadDocument
-from leap.soledad.common.crypto import WrongMacError
+from leap.soledad.common.errors import DatabaseAccessError
from leap.soledad.client import Soledad
from leap.soledad.client.adbapi import U1DBConnectionPool
from leap.soledad.client.secrets import PassphraseTooShort
@@ -114,11 +114,11 @@ class AuxMethodsTestCase(BaseSoledadTest):
sol.close()
def _assert_wrong_password_raises(results):
- self.assertRaises(
- WrongMacError,
- self._soledad_instance, 'leap@leap.se',
- passphrase=u'123',
- prefix=prefix)
+ with self.assertRaises(DatabaseAccessError):
+ self._soledad_instance(
+ 'leap@leap.se',
+ passphrase=u'123',
+ prefix=prefix)
def _instantiate_with_new_passphrase(results):
sol2 = self._soledad_instance(