#NEWLINE# def test_algo_with_rl_violation_after_add( self ) : #NEWLINE# #INDENT# with security_list_copy ( ) : #NEWLINE# #INDENT# add_security_data ( [ 'AAPL' ] , [ ] ) #NEWLINE# algo = RestrictedAlgoWithoutCheck ( symbol = 'AAPL' , sim_params = self . sim_params2 , env = self . env2 ) #NEWLINE# with self . assertRaises ( TradingControlViolation ) as ctx : #NEWLINE# #INDENT# algo . run ( self . data_portal2 ) #NEWLINE# #UNINDENT# self . check_algo_exception ( self , ctx , 2 )