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

Skip to content

Commit cfab237

Browse files
author
Siddharta Govindaraj
committed
Strictly asserting a sequence of calls
1 parent 5d10c46 commit cfab237

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

stock_alerter/tests/test_alert.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ def test_action_fires_when_rule_matches(self):
4646
alert = Alert("sample alert", rule, action)
4747
alert.connect(exchange)
4848
goog.update(datetime(2014, 5, 14), 11)
49-
main_mock.assert_has_calls(
50-
[mock.call.rule.matches(exchange),
51-
mock.call.action.execute("sample alert")])
49+
self.assertEqual([mock.call.rule.depends_on(),
50+
mock.call.rule.matches(exchange),
51+
mock.call.action.execute("sample alert")],
52+
main_mock.mock_calls)

0 commit comments

Comments
 (0)