예제 #1
0
 def test_max_uuid(self):
     u = util.max_uuid_from_time(0)
     # cassandra does a signed comparison of the remaining bytes
     # the first non-time byte has the variant in it
     # This byte is always negative, but should be the smallest negative
     # number with high-order bits '10'
     self.assertEqual(marshal.int8_unpack(u.bytes[8:9]), -65)
     for i in range(9, 16):
         self.assertEqual(marshal.int8_unpack(u.bytes[i:i + 1]), 127)
 def test_max_uuid(self):
     u = util.max_uuid_from_time(0)
     # cassandra does a signed comparison of the remaining bytes
     # the first non-time byte has the variant in it
     # This byte is always negative, but should be the smallest negative
     # number with high-order bits '10'
     self.assertEqual(marshal.int8_unpack(u.bytes[8:9]), -65)
     for i in range(9, 16):
         self.assertEqual(marshal.int8_unpack(u.bytes[i:i + 1]), 127)