summaryrefslogtreecommitdiff
path: root/service/test/unit
diff options
context:
space:
mode:
authorCaio Carrara <ccarrara@thoughtworks.com>2016-06-07 14:52:21 -0300
committerCaio Carrara <ccarrara@thoughtworks.com>2016-06-07 14:52:21 -0300
commitc384e5ff9b3bf1527732cf765b50dc436b36c8e1 (patch)
tree7e3d561f989228a6f9f058218e6f4f81445fd22e /service/test/unit
parent460074b11ac9171cb7b260e1ffc01e040105b3e5 (diff)
Update keymanager calls due api update
Some keymanager api was updated, so we needed to update some calls.
Diffstat (limited to 'service/test/unit')
-rw-r--r--service/test/unit/bitmask_libraries/test_nicknym.py4
-rw-r--r--service/test/unit/resources/test_keys_resources.py3
-rw-r--r--service/test/unit/resources/test_user_settings_resource.py2
3 files changed, 5 insertions, 4 deletions
diff --git a/service/test/unit/bitmask_libraries/test_nicknym.py b/service/test/unit/bitmask_libraries/test_nicknym.py
index e75bc913..d15f1a75 100644
--- a/service/test/unit/bitmask_libraries/test_nicknym.py
+++ b/service/test/unit/bitmask_libraries/test_nicknym.py
@@ -62,5 +62,5 @@ class NickNymTest(AbstractLeapTest):
# when/then
nicknym.generate_openpgp_key()
- keyman.get_key.assert_called_with('test_user@some-server.test', openpgp.OpenPGPKey, private=True, fetch_remote=False)
- keyman.gen_key.assert_called_with(openpgp.OpenPGPKey)
+ keyman.get_key.assert_called_with('test_user@some-server.test', private=True, fetch_remote=False)
+ keyman.gen_key.assert_called()
diff --git a/service/test/unit/resources/test_keys_resources.py b/service/test/unit/resources/test_keys_resources.py
index 2bf53cb4..4aae8713 100644
--- a/service/test/unit/resources/test_keys_resources.py
+++ b/service/test/unit/resources/test_keys_resources.py
@@ -1,7 +1,8 @@
import json
import ast
from mockito import mock, when, any as ANY
-from leap.keymanager import OpenPGPKey, KeyNotFound
+from leap.keymanager import KeyNotFound
+from leap.keymanager.keys import OpenPGPKey
from pixelated.application import ServicesFactory, UserAgentMode
from pixelated.resources.keys_resource import KeysResource
diff --git a/service/test/unit/resources/test_user_settings_resource.py b/service/test/unit/resources/test_user_settings_resource.py
index d69f4895..42626cd5 100644
--- a/service/test/unit/resources/test_user_settings_resource.py
+++ b/service/test/unit/resources/test_user_settings_resource.py
@@ -7,7 +7,7 @@ from pixelated.resources.user_settings_resource import UserSettingsResource, FIN
from mockito import mock, when, any
from test.unit.resources import DummySite
from twisted.web.test.requesthelper import DummyRequest
-from leap.keymanager import OpenPGPKey
+from leap.keymanager.keys import OpenPGPKey
from twisted.internet import defer
from twisted.python.failure import Failure