summaryrefslogtreecommitdiff
path: root/service/test/unit/bitmask_libraries
diff options
context:
space:
mode:
authorNavaL <ayoyo@thoughtworks.com>2016-12-05 18:03:24 +0100
committerThais Siqueira <thais.siqueira@gmail.com>2017-01-02 14:29:45 -0200
commit15794e7e624a22e87ca75a28804f97930e06a855 (patch)
tree79ab66e7c54da4c044c993e7dda91ab1ee33e522 /service/test/unit/bitmask_libraries
parentd731d03e277b10f689dc2402d59b80952eb3d2c4 (diff)
[#851] minor refactoring, and using the right keymanager branch
Diffstat (limited to 'service/test/unit/bitmask_libraries')
-rw-r--r--service/test/unit/bitmask_libraries/test_keymanager.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/service/test/unit/bitmask_libraries/test_keymanager.py b/service/test/unit/bitmask_libraries/test_keymanager.py
index ef5edcea..eb6ba79b 100644
--- a/service/test/unit/bitmask_libraries/test_keymanager.py
+++ b/service/test/unit/bitmask_libraries/test_keymanager.py
@@ -80,7 +80,7 @@ class KeymanagerTest(TestCase):
def test_keymanager_generate_openpgp_key_doesnt_regenerate_preexisting_key(self):
mock_open_pgp_key = MagicMock()
- mock_open_pgp_key.should_be_renewed = MagicMock(return_value=False)
+ mock_open_pgp_key.needs_renewal = MagicMock(return_value=False)
when(self.keymanager)._key_exists('test_user@some-server.test').thenReturn(mock_open_pgp_key)
self.keymanager._gen_key = MagicMock()
@@ -91,7 +91,7 @@ class KeymanagerTest(TestCase):
def test_keymanager_generate_openpgp_key_doesnt_upload_preexisting_key(self):
mock_open_pgp_key = MagicMock()
- mock_open_pgp_key.should_be_renewed = MagicMock(return_value=False)
+ mock_open_pgp_key.needs_renewal = MagicMock(return_value=False)
when(self.keymanager)._key_exists('test_user@some-server.test').thenReturn(mock_open_pgp_key)
self.keymanager._send_key_to_leap = MagicMock()
@@ -115,7 +115,7 @@ class KeymanagerTest(TestCase):
@defer.inlineCallbacks
def test_keymanager_regenerate_key_pair_if_current_key_is_about_to_expire(self):
mock_open_pgp_key = MagicMock()
- mock_open_pgp_key.should_be_renewed.return_value(True)
+ mock_open_pgp_key.needs_renewal.return_value(True)
when(self.keymanager)._key_exists('test_user@some-server.test').thenReturn(mock_open_pgp_key)
yield self.keymanager.generate_openpgp_key()
@@ -126,7 +126,7 @@ class KeymanagerTest(TestCase):
@defer.inlineCallbacks
def test_key_regeneration_does_not_delete_key_when_upload_fails(self):
mock_open_pgp_key = MagicMock()
- mock_open_pgp_key.should_be_renewed.return_value(True)
+ mock_open_pgp_key.needs_renewal.return_value(True)
self.leap_keymanager.get_key = MagicMock(return_value=defer.succeed(mock_open_pgp_key))
self.leap_keymanager.send_key = MagicMock(side_effect=UploadKeyError('Could not upload key'))