~ubuntu-branches/ubuntu/wily/heat/wily

« back to all changes in this revision

Viewing changes to heat/tests/test_timeutils.py

  • Committer: Package Import Robot
  • Author(s): Corey Bryant
  • Date: 2015-08-19 08:11:50 UTC
  • mfrom: (1.1.27)
  • Revision ID: package-import@ubuntu.com-20150819081150-m969fd35xn8bdmfu
Tags: 1:5.0.0~b2-0ubuntu1
* New upstream milestone for OpenStack Liberty.
* d/control: Align (build-)depends with upstream.
* d/p/fix-requirements.patch: Dropped. No longer needed.
* d/p/fixup-assert-regex.patch: Rebased.
* d/rules: Remove .eggs directory in override_dh_auto_clean.

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
        self.assertRaises(ValueError, util.parse_isoduration, 'ABCDEFGH')
47
47
 
48
48
 
 
49
class DurationTest(common.HeatTestCase):
 
50
 
 
51
    def setUp(self):
 
52
        super(DurationTest, self).setUp()
 
53
        st = util.wallclock()
 
54
        mock_clock = self.patchobject(util, 'wallclock')
 
55
        mock_clock.side_effect = [st, st + 0.5]
 
56
 
 
57
    def test_duration_not_expired(self):
 
58
        self.assertFalse(util.Duration(1.0).expired())
 
59
 
 
60
    def test_duration_expired(self):
 
61
        self.assertTrue(util.Duration(0.1).expired())
 
62
 
 
63
 
49
64
class RetryBackoffExponentialTest(common.HeatTestCase):
50
65
 
51
66
    scenarios = [(