Distil-UI project is depending on distilclient and now there is a py35
gate failure because disticlient doesn't fully support py3.x. This patch
fixes it and adds some test cases to make sure the change won't break
the functions.
Besides, the patch also fixes some pep8 issues by the way.
Change-Id: Ide043d0fca019cd48796669374dc882311e935a1