diff options
-rw-r--r-- | service/pixelated/config/leap.py | 2 | ||||
-rw-r--r-- | service/test/unit/config/test_leap.py | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/service/pixelated/config/leap.py b/service/pixelated/config/leap.py index 52a70f3e..2b3a242a 100644 --- a/service/pixelated/config/leap.py +++ b/service/pixelated/config/leap.py @@ -99,7 +99,7 @@ class BootstrapUserServices(object): log.warn('{0}: {1}. Closing session for user: {2}'.format(e.__class__.__name__, e, user_auth.username)) if leap_session: leap_session.close() - raise e + raise @defer.inlineCallbacks def _setup_user_services(self, leap_session): diff --git a/service/test/unit/config/test_leap.py b/service/test/unit/config/test_leap.py index 29f19f2f..3cfa43f2 100644 --- a/service/test/unit/config/test_leap.py +++ b/service/test/unit/config/test_leap.py @@ -14,7 +14,6 @@ # You should have received a copy of the GNU Affero General Public License # along with Pixelated. If not, see <http://www.gnu.org/licenses/>. -from leap.soledad.common.errors import InvalidAuthTokenError from mock import MagicMock, patch, Mock from twisted.trial import unittest from twisted.internet import defer @@ -170,7 +169,7 @@ class TestUserBootstrap(unittest.TestCase): @patch('pixelated.config.leap.create_leap_session') @patch('pixelated.config.leap.log.warn') @defer.inlineCallbacks - def test__setup__should_close_leap_sesson_on_error_from__setup_user_services(self, mock_logger_warn, mock_create_leap_session, mock_setup_user_services): + def test__setup__should_close_leap_session_on_error_from__setup_user_services(self, mock_logger_warn, mock_create_leap_session, mock_setup_user_services): leap_session = Mock() leap_session.close = Mock() mock_create_leap_session.return_value = leap_session @@ -184,7 +183,7 @@ class TestUserBootstrap(unittest.TestCase): @patch('pixelated.config.leap.create_leap_session') @patch('pixelated.config.leap.log.warn') @defer.inlineCallbacks - def test__setup__should_close_leap_sesson_on_error_from__add_welcome_email(self, mock_logger_warn, mock_create_leap_session, _, mock_add_welcome_email): + def test__setup__should_close_leap_session_on_error_from__add_welcome_email(self, mock_logger_warn, mock_create_leap_session, _, mock_add_welcome_email): leap_session = Mock() leap_session.close = Mock() mock_create_leap_session.return_value = leap_session |