[#1841] fix tests, pep8