fix tests for dock and some pep8 violations