summaryrefslogtreecommitdiff
path: root/tests/integration
diff options
context:
space:
mode:
authorRuben Pollan <meskio@sindominio.net>2017-10-24 11:50:30 +0200
committerRuben Pollan <meskio@sindominio.net>2017-10-26 18:37:04 +0200
commitd16b25da0962156601615587a612b57b918b0dc6 (patch)
treea12a9b3bd7b9ed75c9515da8293ea115e132106a /tests/integration
parentbeb9f0449ec680d5adfab09e5969819aba99b7ef (diff)
[bug] make nicknym return key data
There was a mismatch on the return values of Nicknym class and the expectations. As most of the code was expecting an OpenPGPKey, but it was returning the json as it came from the nickserver. Now is just returning the key data.
Diffstat (limited to 'tests/integration')
-rw-r--r--tests/integration/keymanager/test_refresher.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/integration/keymanager/test_refresher.py b/tests/integration/keymanager/test_refresher.py
index 24ad4b0..47a27b4 100644
--- a/tests/integration/keymanager/test_refresher.py
+++ b/tests/integration/keymanager/test_refresher.py
@@ -32,7 +32,7 @@ from leap.bitmask.keymanager.refresher import RandomRefreshPublicKey, \
ERROR_UNEQUAL_FINGERPRINTS
from leap.bitmask.keymanager.testing import KeyManagerWithSoledadTestCase
-from common import KEY_FINGERPRINT
+from common import KEY_FINGERPRINT, PUBLIC_KEY_2, KEY_FINGERPRINT_2
ANOTHER_FP = 'ANOTHERFINGERPRINT'
@@ -76,13 +76,13 @@ class RandomRefreshPublicKeyTestCase(KeyManagerWithSoledadTestCase):
fingerprint=KEY_FINGERPRINT)))
km._nicknym.fetch_key_with_fingerprint = \
- Mock(return_value=defer.succeed(OpenPGPKey(
- fingerprint=ANOTHER_FP)))
+ Mock(return_value=defer.succeed(PUBLIC_KEY_2))
yield rf.maybe_refresh_key()
- mock_logger_error.assert_called_with(ERROR_UNEQUAL_FINGERPRINTS %
- (KEY_FINGERPRINT, ANOTHER_FP))
+ mock_logger_error.assert_called_with(
+ ERROR_UNEQUAL_FINGERPRINTS %
+ (KEY_FINGERPRINT, KEY_FINGERPRINT_2))
@defer.inlineCallbacks
def test_put_new_key_in_local_storage(self):
@@ -95,7 +95,7 @@ class RandomRefreshPublicKeyTestCase(KeyManagerWithSoledadTestCase):
OpenPGPKey(fingerprint=KEY_FINGERPRINT)))
km._nicknym.fetch_key_with_fingerprint = Mock(
- return_value=defer.succeed(OpenPGPKey(fingerprint=ANOTHER_FP)))
+ return_value=defer.succeed(PUBLIC_KEY_2))
yield rf.maybe_refresh_key()