Ejemplo n.º 1
0
 def test_struct_unpack_error_converts_to_message_parse_error(self):  # pylint: disable=invalid-name
     data = bytes.fromhex("01001000")
     try:
         MessageParser.eap_parse(
             data, MacAddress.from_string("00:00:00:12:34:56"))
     except MessageParseError as exception:
         self.assertIsInstance(exception.__cause__, struct.error)
         return
     self.fail()
Ejemplo n.º 2
0
 def data(self):
     from chewie.message_parser import MessageParser  # pylint: disable=import-outside-toplevel
     return MessageParser.eap_parse(self._data_type.data(), None)