summaryrefslogtreecommitdiff
path: root/service/test
diff options
context:
space:
mode:
authorTulio Casagrande <tcasagra@thoughtworks.com>2017-01-21 11:48:08 -0200
committerTulio Casagrande <tcasagra@thoughtworks.com>2017-01-21 12:10:19 -0200
commita966e35f5d3eda2cdcd39899e9bce6db6b4da73a (patch)
treecf2df31805e011c5d32f770dfdde06cc36330e84 /service/test
parent3d3c620ac53de1c407ff2ff222d923310770ed62 (diff)
Remove old UploadKeyError test
I was surprised this test was not working correctly.
Diffstat (limited to 'service/test')
-rw-r--r--service/test/unit/config/test_sessions.py13
1 files changed, 0 insertions, 13 deletions
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
@@ -44,17 +42,6 @@ class SessionTest(AbstractLeapTest):
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')
@defer.inlineCallbacks