#NEWLINE# def testFit( self ) : #NEWLINE# #INDENT# original = conf . supybot . plugins . Topic . format ( ) #NEWLINE# try : #NEWLINE# #INDENT# conf . supybot . plugins . Topic . format . setValue ( '$topic' ) #NEWLINE# self . irc . state . supported [ 'TOPICLEN' ] = 20 #NEWLINE# self . assertResponse ( 'topic fit foo' , 'foo' ) #NEWLINE# self . assertResponse ( 'topic fit bar' , 'foo | bar' ) #NEWLINE# self . assertResponse ( 'topic fit baz' , 'foo | bar | baz' ) #NEWLINE# self . assertResponse ( 'topic fit qux' , 'bar | baz | qux' ) #NEWLINE# #UNINDENT# finally : #NEWLINE# #INDENT# conf . supybot . plugins . Topic . format . setValue ( original ) #NEWLINE# self . irc . state . supported . pop ( 'TOPICLEN' , None )