Fix and mock TestPreferredTranslatorsFunction test call
Fix pep8