mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-06-19 22:48:45 +00:00
tests: remove old wire_codec test example
This commit is contained in:
parent
d0b29d4caa
commit
4216e6f544
@ -217,34 +217,5 @@ class TestWireCodec(unittest.TestCase):
|
|||||||
return genfunc
|
return genfunc
|
||||||
|
|
||||||
|
|
||||||
# def test_write_wire_msg(self):
|
|
||||||
|
|
||||||
# # Writing message spanning multiple reports calls msg.send() with
|
|
||||||
# # correct data
|
|
||||||
|
|
||||||
# sent_reps = []
|
|
||||||
|
|
||||||
# def dummy_send(iface, rep):
|
|
||||||
# sent_reps.append(bytes(rep))
|
|
||||||
# return len(rep)
|
|
||||||
|
|
||||||
# msg.send = dummy_send
|
|
||||||
|
|
||||||
# content = bytes([x for x in range(0, 256)])
|
|
||||||
# message = b'##\xab\xcd\x00\x00\x01\00' + content
|
|
||||||
# reports = [b'\x3f' + ch + '\x00' *
|
|
||||||
# (63 - len(ch)) for ch in chunks(message, 63)]
|
|
||||||
|
|
||||||
# writer = write_wire_msg(int('0xabcd'), content)
|
|
||||||
# res = 1 # Something not None
|
|
||||||
# try:
|
|
||||||
# while True:
|
|
||||||
# writer.send(None)
|
|
||||||
# except StopIteration as e:
|
|
||||||
# res = e.value
|
|
||||||
# self.assertEqual(res, None)
|
|
||||||
# self.assertEqual(sent_reps, reports)
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
unittest.main()
|
unittest.main()
|
||||||
|
Loading…
Reference in New Issue
Block a user