def test_should_apply_default_state(self, mock_stroke_apply, mock_fill_apply): canvas = Canvas() canvas.set_default_state() self.assertTrue(mock_stroke_apply.called) self.assertTrue(mock_fill_apply.called)
def test_should_set_default_state(self): canvas = Canvas() set_state(canvas, STATE_1) # when canvas.set_default_state() # then assert_same(self, DEFAULT_STATE, get_state(canvas))