THRIFT-5923: UUID python
Client: py
Patch: CJCombrink
This closes #3330
diff --git a/test/py/TestClient.py b/test/py/TestClient.py
index f608e4e..07b39a0 100755
--- a/test/py/TestClient.py
+++ b/test/py/TestClient.py
@@ -24,6 +24,7 @@
import sys
import time
import unittest
+import uuid
from optparse import OptionParser
from util import local_libpath
@@ -160,6 +161,13 @@
val = bytearray([i for i in range(0, 256)])
self.assertEqual(bytearray(self.client.testBinary(bytes(val))), val)
+ def testUuid(self):
+ print('testUuid')
+ val1 = uuid.UUID('00112233-4455-6677-8899-aabbccddeeff')
+ val2 = uuid.uuid4()
+ self.assertEqual(self.client.testUuid(val1), val1)
+ self.assertEqual(self.client.testUuid(val2), val2)
+
def testStruct(self):
print('testStruct')
x = Xtruct()