tests: update for CallException handling

This commit is contained in:
Roman Zeyde
2016-03-06 22:05:30 +02:00
parent e10b42bbb5
commit 2a5196003e
2 changed files with 8 additions and 4 deletions

View File

@@ -52,7 +52,8 @@ def identity_type(**kwargs):
def load_client():
return factory.ClientWrapper(connection=FakeConnection(),
identity_type=identity_type,
device_name='DEVICE_NAME')
device_name='DEVICE_NAME',
call_exception=Exception)
BLOB = (b'\x00\x00\x00 \xce\xe0\xc9\xd5\xceu/\xe8\xc5\xf2\xbfR+x\xa1\xcf\xb0'

View File

@@ -43,7 +43,8 @@ def test_load_nothing():
hid_transport=hid_transport,
passphrase_ack=None,
identity_type=None,
required_version=None)
required_version=None,
call_exception=None)
assert result == []
@@ -73,7 +74,8 @@ def test_load_single():
hid_transport=hid_transport,
passphrase_ack=passphrase_ack,
identity_type=None,
required_version='>=1.3.4')
required_version='>=1.3.4',
call_exception=None)
assert client_wrapper.connection is client_type.return_value
assert client_wrapper.device_name == 'DEVICE_NAME'
client_wrapper.connection.callback_PassphraseRequest('MESSAGE')
@@ -91,4 +93,5 @@ def test_load_old():
hid_transport=hid_transport,
passphrase_ack=None,
identity_type=None,
required_version='>=1.3.4')
required_version='>=1.3.4',
call_exception=None)