Skip to content

Commit

Permalink
tests: Fix exception type not handled
Browse files Browse the repository at this point in the history
  • Loading branch information
Xavier Chapron committed Dec 7, 2023
1 parent 7de5ad7 commit cabd753
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion tests/speculos/u2f/test_u2f_fake_channel_security_crc.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import pytest
import socket

from fido2.ctap1 import ApduError, Ctap1
from fido2.hid import CTAPHID
Expand Down Expand Up @@ -43,5 +44,5 @@ def test_register_raw_u2f_fake_channel_security_crc(client):
p2=0x00,
data=data)

with pytest.raises((AssertionError, ConnectionResetError, TimeoutError)) as e:
with pytest.raises((AssertionError, ConnectionResetError, TimeoutError, socket.timeout)) as e:
response = client.ctap1.device.recv(CTAPHID.MSG)
3 changes: 2 additions & 1 deletion tests/speculos/u2f/test_u2f_fake_channel_security_length.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import pytest
import socket

from fido2.ctap1 import ApduError, Ctap1
from fido2.hid import CTAPHID
Expand Down Expand Up @@ -44,5 +45,5 @@ def test_register_raw_u2f_fake_channel_security_length(client):
p2=0x00,
data=data)

with pytest.raises((AssertionError, ConnectionResetError, TimeoutError)) as e:
with pytest.raises((AssertionError, ConnectionResetError, TimeoutError, socket.timeout)) as e:
response = client.ctap1.device.recv(CTAPHID.MSG)

0 comments on commit cabd753

Please sign in to comment.