summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/crypto/tests
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2013-10-22 13:29:11 -0400
committerMicah Anderson <micah@riseup.net>2013-10-22 13:29:11 -0400
commitf22b1a04f892857d162d87f9c9e120e7c5daadf7 (patch)
tree8998a60a2f55aa6f22a76e7aa1ec176e16f5cf33 /src/leap/bitmask/crypto/tests
parentdd907d3098c582b9e92eb181efb87453f046dcc6 (diff)
parent522b886046baf114f2b86173661e568c7c065da6 (diff)
Merge remote-tracking branch 'kali/debian-0.3.4' into debian
Diffstat (limited to 'src/leap/bitmask/crypto/tests')
-rw-r--r--src/leap/bitmask/crypto/tests/test_srpauth.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/leap/bitmask/crypto/tests/test_srpauth.py b/src/leap/bitmask/crypto/tests/test_srpauth.py
index 6fb2b739..e63c1385 100644
--- a/src/leap/bitmask/crypto/tests/test_srpauth.py
+++ b/src/leap/bitmask/crypto/tests/test_srpauth.py
@@ -246,7 +246,7 @@ class SRPAuthTestCase(unittest.TestCase):
d = self._prepare_auth_test(422)
def wrapper(_):
- with self.assertRaises(srpauth.SRPAuthUnknownUser):
+ with self.assertRaises(srpauth.SRPAuthBadUserOrPassword):
with mock.patch(
'leap.bitmask.util.request_helpers.get_content',
new=mock.create_autospec(get_content)) as content:
@@ -425,7 +425,7 @@ class SRPAuthTestCase(unittest.TestCase):
new=mock.create_autospec(get_content)) as \
content:
content.return_value = ("", 0)
- with self.assertRaises(srpauth.SRPAuthBadPassword):
+ with self.assertRaises(srpauth.SRPAuthBadUserOrPassword):
self.auth_backend._process_challenge(
salt_B,
username=self.TEST_USER)
@@ -449,7 +449,7 @@ class SRPAuthTestCase(unittest.TestCase):
new=mock.create_autospec(get_content)) as \
content:
content.return_value = ("[]", 0)
- with self.assertRaises(srpauth.SRPAuthBadPassword):
+ with self.assertRaises(srpauth.SRPAuthBadUserOrPassword):
self.auth_backend._process_challenge(
salt_B,
username=self.TEST_USER)
@@ -680,10 +680,7 @@ class SRPAuthTestCase(unittest.TestCase):
self.auth_backend._session.delete,
side_effect=Exception())
- def wrapper(*args):
- self.auth_backend.logout()
-
- d = threads.deferToThread(wrapper)
+ d = threads.deferToThread(self.auth.logout)
return d
@deferred()