#NEWLINE# def testUnaddressedKarma( self ) : #NEWLINE# #INDENT# karma = conf . supybot . plugins . Karma #NEWLINE# resp = karma . response ( ) #NEWLINE# unaddressed = karma . allowUnaddressedKarma ( ) #NEWLINE# try : #NEWLINE# #INDENT# karma . response . setValue ( True ) #NEWLINE# karma . allowUnaddressedKarma . setValue ( True ) #NEWLINE# for m in ( '++' , '--' ) : #NEWLINE# #INDENT# self . assertRegexp ( ( 'foo%s' % m ) , 'is now' ) #NEWLINE# self . assertSnarfRegexp ( ( 'foo%s' % m ) , 'is now' ) #NEWLINE# self . assertRegexp ( ( '(foo bar)%s' % resp ) , 'is now' ) #NEWLINE# self . assertSnarfRegexp ( ( '(foo bar)%s' % m ) , 'is now' ) #NEWLINE# #UNINDENT# #UNINDENT# finally : #NEWLINE# #INDENT# karma . response . setValue ( resp ) #NEWLINE# karma . allowUnaddressedKarma . setValue ( unaddressed )