fix tests and pep8 errors

Fixes pep8 violations and test errors

Change-Id: I381b3fd8ab4c5db55cd4a1c5ae00e21511c41269
Signed-off-by: Laszlo Hornyak <lhornyak@redhat.com>