fdeeaf0 Fix unicode issue for update command in Python 3

Authored and Committed by cqi 6 years ago
    Fix unicode issue for update command in Python 3
    
    With this patch, in update command, unicode string is used consistently
    through the whole process. String written into file by write() method is
    handled carefully with or without encoding to byte string for Python 2
    and 3 individually.
    
    Issue reported in #206 was not caught due to write() was mocked. This
    patch also fixes this problem. Now, during the test, real bodhi.template
    and clog file are written into and read from file system. Tests are
    updated accordingly.
    
    Fixes #206
    
    Signed-off-by: Chenxiong Qi <cqi@redhat.com>
    
        
file modified
+11 -13
file modified
+37 -21