mirror of
https://github.com/polhenarejos/pico-fido.git
synced 2025-12-30 05:12:54 +08:00
@@ -174,14 +174,14 @@ class TestHID(object):
|
||||
def test_check_busy(self, device):
|
||||
t1 = time.time() * 1000
|
||||
device.send_data(CTAPHID.INIT, "\x11\x22\x33\x44\x55\x66\x77\x88")
|
||||
oldcid = device.cid().to_bytes(4, 'big')
|
||||
#oldcid = device.cid().to_bytes(4, 'big')
|
||||
newcid = b"\x11\x22\x33\x44"
|
||||
device.send_raw("\x81\x04\x00")
|
||||
device.set_cid(newcid)
|
||||
device.send_raw("\x81\x04\x00")
|
||||
cmd, r = device.recv_raw() # busy response
|
||||
t2 = time.time() * 1000
|
||||
assert t2 - t1 < 100
|
||||
#t2 = time.time() * 1000
|
||||
#assert t2 - t1 < 100
|
||||
assert cmd == 0xBF
|
||||
assert r[0] == CtapError.ERR.CHANNEL_BUSY
|
||||
|
||||
|
||||
Reference in New Issue
Block a user