@@ -12,7 +12,7 @@ def __init__(self, exchange):
1212
1313
1414class AlertProcessorTest (unittest .TestCase ):
15- @mock .patch ("__builtin__ .print" )
15+ @mock .patch ("stock_alerter.legacy .print" )
1616 def test_processor_characterization_1 (self , mock_print ):
1717 AlertProcessor ()
1818 mock_print .assert_has_calls ([mock .call ("AAPL" , 8 ),
@@ -22,7 +22,7 @@ def test_processor_characterization_1(self, mock_print):
2222
2323 def test_processor_characterization_2 (self ):
2424 processor = AlertProcessor (autorun = False )
25- with mock .patch ("__builtin__ .print" ) as mock_print :
25+ with mock .patch ("stock_alerter.legacy .print" ) as mock_print :
2626 processor .run ()
2727 mock_print .assert_has_calls ([mock .call ("AAPL" , 8 ),
2828 mock .call ("GOOG" , 15 ),
@@ -72,7 +72,7 @@ def test_processor_characterization_7(self):
7272 processor .parse_file = mock .Mock ()
7373 processor .parse_file .return_value = [
7474 ('GOOG' , datetime (2014 , 2 , 11 , 14 , 12 , 22 , 130000 ), 15 )]
75- with mock .patch ("__builtin__ .print" ) as mock_print :
75+ with mock .patch ("stock_alerter.legacy .print" ) as mock_print :
7676 processor .run ()
7777 mock_print .assert_called_with ("GOOG" , 15 )
7878
@@ -81,7 +81,7 @@ def test_processor_characterization_8(self):
8181 processor .parse_file = mock .Mock ()
8282 processor .parse_file .return_value = [
8383 ('GOOG' , datetime (2014 , 2 , 11 , 14 , 10 , 22 , 130000 ), 5 )]
84- with mock .patch ("__builtin__ .print" ) as mock_print :
84+ with mock .patch ("stock_alerter.legacy .print" ) as mock_print :
8585 processor .run ()
8686 self .assertFalse (mock_print .called )
8787
0 commit comments