(self)
| 114 | timer.countdown.assert_called_once_with(30, toaster.pop_up) |
| 115 | |
| 116 | def test_end(self): |
| 117 | timer = Mock(spec=ReusableTimer) |
| 118 | toaster = Toaster(timer) |
| 119 | toaster.hot = True |
| 120 | toaster.pop_up() |
| 121 | self.assertFalse(toaster.hot) |
| 122 | timer.end.assert_called_once() |
| 123 | |
| 124 | import unittest |
| 125 |