From a966e35f5d3eda2cdcd39899e9bce6db6b4da73a Mon Sep 17 00:00:00 2001 From: Tulio Casagrande Date: Sat, 21 Jan 2017 11:48:08 -0200 Subject: Remove old UploadKeyError test I was surprised this test was not working correctly. --- service/test/unit/config/test_sessions.py | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'service/test') diff --git a/service/test/unit/config/test_sessions.py b/service/test/unit/config/test_sessions.py index 06bffc97..b5e4029d 100644 --- a/service/test/unit/config/test_sessions.py +++ b/service/test/unit/config/test_sessions.py @@ -17,10 +17,8 @@ from mock import patch from mock import MagicMock -from mockito import when from twisted.internet import defer from pixelated.config.sessions import LeapSession, SessionCache, LeapSessionFactory, SoledadWrongPassphraseException -from pixelated.bitmask_libraries.keymanager import UploadKeyError from test.unit.bitmask_libraries.test_abstract_leap import AbstractLeapTest from leap.common.events.catalog import KEYMANAGER_FINISHED_KEY_GENERATION from leap.soledad.common.crypto import WrongMacError, UnknownMacMethodError @@ -43,17 +41,6 @@ class SessionTest(AbstractLeapTest): yield session.first_required_sync() mail_fetcher_mock.startService.assert_called_once() - @patch('pixelated.config.sessions.register') - @defer.inlineCallbacks - def test_upload_key_error_closes_the_session(self, _): - when(self.keymanager).generate_openpgp_key().thenRaise(UploadKeyError('Could not upload key')) - session = self._create_session() - session.close = MagicMock() - - with self.assertRaises(UploadKeyError): - yield session.finish_bootstrap() - session.close.assert_called_once() - @patch('pixelated.config.sessions.register') @patch('pixelated.config.sessions.unregister') @patch('pixelated.config.sessions.Account') -- cgit v1.2.3