LUN-455. Updated tests and reformatted PEP8 code.