Esempio n. 1
0
    def test_from_ctype(self):
        ae = self.assertEqual

        stream = ByteIStream(bytes([x for x in range(16)]))
        uuid1 = guid_be.from_buffer_copy(stream.read(16))
        uuid1 = GUIDToUUID.from_ctype(uuid1)

        ae(uuid1, UUID(bytes=bytes([x for x in range(16)])))
Esempio n. 2
0
    def test_from_ctype(self):
        ae = self.assertEqual

        stream = ByteIStream(bytes([x for x in range(16)]))
        uuid1 = guid_be.from_buffer_copy(stream.read(16))
        uuid1 = GUIDToUUID.from_ctype(uuid1)

        ae(uuid1, UUID(bytes=bytes([x for x in range(16)])))