Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ad373f7

Browse files
author
Siddharta Govindaraj
committed
Tenth characterisation test
1 parent 288e118 commit ad373f7

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

stock_alerter/tests/test_legacy.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,3 +91,12 @@ def test_processor_characterization_9(self):
9191
processor.do_updates([
9292
('GOOG', datetime(2014, 2, 11, 14, 12, 22, 130000), 15)])
9393
self.assertTrue(processor.print_action.called)
94+
95+
def test_processor_gets_values_from_reader(self):
96+
mock_reader = mock.MagicMock()
97+
mock_reader.parse_file.return_value = \
98+
[('GOOG', datetime(2014, 2, 11, 14, 12, 22, 130000), 15)]
99+
processor = AlertProcessor(autorun=False, reader=mock_reader)
100+
processor.print_action = mock.Mock()
101+
processor.run()
102+
self.assertTrue(processor.print_action.called)

0 commit comments

Comments
 (0)