[python-win32] testing ADSI GUID buffer objects

David Primmer primmer at google.com
Thu Jul 27 00:44:31 CEST 2006


I am trying to write a unit test for a function that accepts a buffer 
   object. As far as I can tell, buffer's cannot be directly represented 
in code. How do I create the object for the test? (The buffer object comes
through ADSI in an Active Directory query of the user GUID property).
If I print the GUID property, it prints a Unicode encoded string of the 
byte stream: u'8108fd1ac12c0d42924355c8d9987f19'. I don't believe this 
is the 'native' representation. The function I'm trying to test 
translates it to MS's hex format: '{38303138-6466-6131-6331-326330643432}'

Any danger using this unicode format?

-- 
David Primmer
Google WinOps Mail
primmer at google.com
650-253-3956


More information about the Python-win32 mailing list