mirror of
https://github.com/romanz/amodem.git
synced 2026-04-20 13:16:42 +08:00
tests: update for CallException handling
This commit is contained in:
@@ -52,7 +52,8 @@ def identity_type(**kwargs):
|
|||||||
def load_client():
|
def load_client():
|
||||||
return factory.ClientWrapper(connection=FakeConnection(),
|
return factory.ClientWrapper(connection=FakeConnection(),
|
||||||
identity_type=identity_type,
|
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'
|
BLOB = (b'\x00\x00\x00 \xce\xe0\xc9\xd5\xceu/\xe8\xc5\xf2\xbfR+x\xa1\xcf\xb0'
|
||||||
|
|||||||
@@ -43,7 +43,8 @@ def test_load_nothing():
|
|||||||
hid_transport=hid_transport,
|
hid_transport=hid_transport,
|
||||||
passphrase_ack=None,
|
passphrase_ack=None,
|
||||||
identity_type=None,
|
identity_type=None,
|
||||||
required_version=None)
|
required_version=None,
|
||||||
|
call_exception=None)
|
||||||
assert result == []
|
assert result == []
|
||||||
|
|
||||||
|
|
||||||
@@ -73,7 +74,8 @@ def test_load_single():
|
|||||||
hid_transport=hid_transport,
|
hid_transport=hid_transport,
|
||||||
passphrase_ack=passphrase_ack,
|
passphrase_ack=passphrase_ack,
|
||||||
identity_type=None,
|
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.connection is client_type.return_value
|
||||||
assert client_wrapper.device_name == 'DEVICE_NAME'
|
assert client_wrapper.device_name == 'DEVICE_NAME'
|
||||||
client_wrapper.connection.callback_PassphraseRequest('MESSAGE')
|
client_wrapper.connection.callback_PassphraseRequest('MESSAGE')
|
||||||
@@ -91,4 +93,5 @@ def test_load_old():
|
|||||||
hid_transport=hid_transport,
|
hid_transport=hid_transport,
|
||||||
passphrase_ack=None,
|
passphrase_ack=None,
|
||||||
identity_type=None,
|
identity_type=None,
|
||||||
required_version='>=1.3.4')
|
required_version='>=1.3.4',
|
||||||
|
call_exception=None)
|
||||||
|
|||||||
Reference in New Issue
Block a user