Some PEP8 fixes
Added test for ClientException