summaryrefslogtreecommitdiff
path: root/service/test/unit/resources/test_login_resource.py
diff options
context:
space:
mode:
authorTulio Casagrande <tcasagra@thoughtworks.com>2016-09-23 15:28:59 -0300
committerTulio Casagrande <tcasagra@thoughtworks.com>2016-09-23 15:38:47 -0300
commit62e7904d8791a600474ca6491db75eb9102a1093 (patch)
tree180235903c9c0d195083f89fb740f641218a7319 /service/test/unit/resources/test_login_resource.py
parente2cb0deda1e0668dd23e0fefc8020d10c1cad488 (diff)
Replace SRPSession usages with bonafide
In order to replace leap_auth with bonafide, we created a class to hold the user credentials
Diffstat (limited to 'service/test/unit/resources/test_login_resource.py')
-rw-r--r--service/test/unit/resources/test_login_resource.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/service/test/unit/resources/test_login_resource.py b/service/test/unit/resources/test_login_resource.py
index c2b89654..6383e25c 100644
--- a/service/test/unit/resources/test_login_resource.py
+++ b/service/test/unit/resources/test_login_resource.py
@@ -2,17 +2,16 @@ import os
import test.support.mockito
-from leap.exceptions import SRPAuthenticationError
+from leap.bonafide._srp import SRPAuthError
from mock import patch
from mockito import mock, when, any as ANY, verify, verifyZeroInteractions, verifyNoMoreInteractions
from twisted.trial import unittest
from twisted.web.resource import IResource
from twisted.web.test.requesthelper import DummyRequest
-from pixelated.config.sessions import LeapSessionFactory, LeapSession
-from pixelated.resources.login_resource import (
- LoginResource,
- parse_accept_language)
+from pixelated.config.sessions import LeapSession
+from pixelated.resources.login_resource import LoginResource
+from pixelated.resources.login_resource import parse_accept_language
from test.unit.resources import DummySite
@@ -246,7 +245,7 @@ class TestLoginPOST(unittest.TestCase):
@patch('leap.auth.SRPAuth.authenticate')
@patch('pixelated.config.services.Services.setup')
def test_leap_session_is_not_created_when_leap_auth_fails(self, mock_service_setup, mock_leap_srp_auth, mock_leap_session_create):
- mock_leap_srp_auth.side_effect = SRPAuthenticationError()
+ mock_leap_srp_auth.side_effect = SRPAuthError()
d = self.web.get(self.request)