@mock.patch.object(stack.Stack, 'time_elapsed')
def test_has_timed_out(self, mock_te):
    self.stack = stack.Stack(self.ctx, 'test_stack', self.tmpl)
    self.stack.status = self.stack.IN_PROGRESS
    mock_te.return_value = 3601
    self.assertTrue(self.stack.has_timed_out())
    mock_te.return_value = 600
    self.assertFalse(self.stack.has_timed_out())
    self.stack.status = self.stack.COMPLETE
    self.assertFalse(self.stack.has_timed_out())
    self.stack.status = self.stack.FAILED
    self.assertFalse(self.stack.has_timed_out())
@mock.patch.object(stack.Stack, 'time_elapsed')
def test_has_timed_out(self, mock_te):
    self.stack = stack.Stack(self.ctx, 'test_stack', self.tmpl)
    self.stack.status = self.stack.IN_PROGRESS
    mock_te.return_value = 3601
    self.assertTrue(self.stack.has_timed_out())
    mock_te.return_value = 600
    self.assertFalse(self.stack.has_timed_out())
    self.stack.status = self.stack.COMPLETE
    self.assertFalse(self.stack.has_timed_out())
    self.stack.status = self.stack.FAILED
    self.assertFalse(self.stack.has_timed_out())