81b54ec intg: Fix python3 issues

Authored and Committed by lslebodn 6 years ago
    intg: Fix python3 issues
    
    NamedTemporaryFile use the default mode 'w+b'
    and we tried to write strings. It is not a problem on python2
    but failed on pyhton3
    
    Python module ctypes directly uses C functions from libraries.
    C functions usually expect/returns "char *" when string is expected.
    But python3 uses unicode for string. Decoding returned bytes
    ("char *") to unicode strings simplify tests in python3.
    Otherwise we would need to convert bytes to string in each assertion.
    
    Reviewed-by: Martin Basti <mbasti@redhat.com>
    (cherry picked from commit bac4458c89a589055ae3daf4f72cc7dba886264a)
    
        
file modified
+4 -2