#NEWLINE# def test_apply( self ) : #NEWLINE# #INDENT# env = Envelope ( ) #NEWLINE# env . parse ( b'X-Spam-Status: NO\r\n\r\n' ) #NEWLINE# self . mox . StubOutWithMock ( self . sa , 'scan' ) #NEWLINE# self . sa . scan ( env ) . AndReturn ( ( True , [ 'one' , 'two' ] ) ) #NEWLINE# self . mox . ReplayAll ( ) #NEWLINE# self . sa . apply ( env ) #NEWLINE# self . assertEqual ( 'YES' , env . headers [ 'X-Spam-Status' ] ) #NEWLINE# self . assertEqual ( 'one, two' , env . headers [ 'X-Spam-Symbols' ] )