summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/crypto/tests/test_srpauth.py
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2013-10-14 17:33:57 -0300
committerKali Kaneko <kali@leap.se>2013-10-14 17:33:57 -0300
commit5d573b4f10109811b1ec7d277dfb15c548f00530 (patch)
tree3de86f0c027a29f7dfb2dac94e3d7f9251f1018b /src/leap/bitmask/crypto/tests/test_srpauth.py
parent5111539437aa98660e72a19e2468b3e3fac44942 (diff)
parent584866689560bd2ebea01ecc5e6ae5e79ce7fc81 (diff)
Merge tag '0.3.4' into debian
Tag leap.bitmask version 0.3.4 Conflicts: pkg/requirements.pip
Diffstat (limited to 'src/leap/bitmask/crypto/tests/test_srpauth.py')
-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()