def integerToUuid(sourceInt): sourceUuid = Uuid.from_int(sourceInt, 'Account') resultedUuid = seto.Uuid128() resultedUuid.low = sourceUuid.low resultedUuid.high = sourceUuid.high return resultedUuid
def test_that_uuidToInteger_and_integerToUuid_are_symmetric_with_low_and_high_if_high_is_zero(self): uid = Uuid.from_int((0, ORIGINAL_LOW), TEST_TAG) self.assertUuidsConversionIsSymmetric(uid)
def uuidToInteger(uuid): uu = Uuid.from_int((uuid.high, uuid.low), 'Account') return uuid_to_int(uu.to_hex())
def test_that_uuidToInteger_and_integerToUuid_are_symmetric(self): testId=1231 uid = Uuid.from_int(testId, TEST_TAG) self.assertUuidsConversionIsSymmetric(uid)