Merge banana-remove-duplication-7665

Author: wolfgang61, exarkun
Reviewer: exarkun
Fixes: #7665

Remove some duplication in the encoding logic in the twisted.spread.banana unit tests.


git-svn-id: svn://svn.twistedmatrix.com/svn/Twisted/trunk@43232 bbbe8e31-12d6-0310-92fd-ac37d47ddeeb