コード例 #1
0
    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])
コード例 #2
0
    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])
コード例 #3
0
    def test_parse_with_empty_data(self):
        parser = Parser(bytearray(0))

        ext = ECPointFormatsExtension()

        ext.parse(parser)

        self.assertIsNone(ext.formats)
コード例 #4
0
    def test_parse_with_empty_data(self):
        parser = Parser(bytearray(0))

        ext = ECPointFormatsExtension()

        ext.parse(parser)

        self.assertIsNone(ext.formats)