(self)
| 107 | class ToasterUnitTest(TestCase): |
| 108 | |
| 109 | def test_start(self): |
| 110 | timer = Mock(spec=ReusableTimer) |
| 111 | toaster = Toaster(timer) |
| 112 | toaster.push_down() |
| 113 | self.assertTrue(toaster.hot) |
| 114 | timer.countdown.assert_called_once_with(30, toaster.pop_up) |
| 115 | |
| 116 | def test_end(self): |
| 117 | timer = Mock(spec=ReusableTimer) |