def test_parse(self): parser = Parser(bytearray(b'\x01\x00')) ext = ECPointFormatsExtension() self.assertIsNone(ext.formats) ext.parse(parser) self.assertEqual(ext.formats, [ECPointFormat.uncompressed])
def test_parse_with_empty_data(self): parser = Parser(bytearray(0)) ext = ECPointFormatsExtension() ext.parse(parser) self.assertIsNone(ext.formats)