refactoring : enforcing pep8 and separating given/when/then clauses