diff options
author | Tomás Touceda <chiiph@leap.se> | 2013-10-04 12:09:58 -0300 |
---|---|---|
committer | Tomás Touceda <chiiph@leap.se> | 2013-10-04 12:09:58 -0300 |
commit | 584866689560bd2ebea01ecc5e6ae5e79ce7fc81 (patch) | |
tree | 4fe300c3c105e17721f79eeece9bbd3745b43d78 /src/leap/bitmask/crypto/tests/test_srpauth.py | |
parent | 1f0f8efc4cb985c082b3b8fe7b3dc45aed047a47 (diff) | |
parent | 759d73ae0728f074e0fb0740269249d0e5066574 (diff) |
Merge branch 'release-0.3.4'
Diffstat (limited to 'src/leap/bitmask/crypto/tests/test_srpauth.py')
-rw-r--r-- | src/leap/bitmask/crypto/tests/test_srpauth.py | 11 |
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() |