summaryrefslogtreecommitdiff
path: root/tests/integration/keymanager
diff options
context:
space:
mode:
authorVictor Shyba <victor1984@riseup.net>2016-10-31 00:14:27 -0300
committerKali Kaneko (leap communications) <kali@leap.se>2016-11-03 14:28:16 +0100
commit3b3b2761266dde8f21ce70e8f7cad23921996b83 (patch)
tree21c2e27050825acaaa4ff4d9e3fe472552ff9f51 /tests/integration/keymanager
parentb160ee5776f16b4ea59e5c07918b21b14550ad71 (diff)
[tests] _insert_key_docs is a deferred
Missing yield from _insert_key_docs, which returns a Deferred, was causing tests to fail.
Diffstat (limited to 'tests/integration/keymanager')
-rw-r--r--tests/integration/keymanager/test_openpgp.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/tests/integration/keymanager/test_openpgp.py b/tests/integration/keymanager/test_openpgp.py
index a730bd4d..289480f1 100644
--- a/tests/integration/keymanager/test_openpgp.py
+++ b/tests/integration/keymanager/test_openpgp.py
@@ -19,7 +19,7 @@ Tests for the OpenPGP support on Key Manager.
"""
from datetime import datetime
from mock import Mock
-from twisted.internet.defer import inlineCallbacks, gatherResults, succeed
+from twisted.internet.defer import inlineCallbacks, succeed
from leap.bitmask.keymanager import (
KeyNotFound,
@@ -27,7 +27,6 @@ from leap.bitmask.keymanager import (
)
from leap.bitmask.keymanager.documents import (
TYPE_FINGERPRINT_PRIVATE_INDEX,
- TYPE_ADDRESS_PRIVATE_INDEX,
)
from leap.bitmask.keymanager.keys import OpenPGPKey
from leap.bitmask.keymanager.testing import KeyManagerWithSoledadTestCase
@@ -253,9 +252,9 @@ class OpenPGPCryptoTestCase(KeyManagerWithSoledadTestCase):
@inlineCallbacks
def test_self_repair_three_keys(self):
refreshed_keep = datetime(2007, 1, 1)
- self._insert_key_docs([datetime(2005, 1, 1),
- refreshed_keep,
- datetime(2001, 1, 1)])
+ yield self._insert_key_docs([datetime(2005, 1, 1),
+ refreshed_keep,
+ datetime(2001, 1, 1)])
delete_doc = self._mock_delete_doc()
pgp = openpgp.OpenPGPScheme(
@@ -294,9 +293,9 @@ class OpenPGPCryptoTestCase(KeyManagerWithSoledadTestCase):
@inlineCallbacks
def test_self_repair_put_keys(self):
- self._insert_key_docs([datetime(2005, 1, 1),
- datetime(2007, 1, 1),
- datetime(2001, 1, 1)])
+ yield self._insert_key_docs([datetime(2005, 1, 1),
+ datetime(2007, 1, 1),
+ datetime(2001, 1, 1)])
delete_doc = self._mock_delete_doc()
pgp = openpgp.OpenPGPScheme(