diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2013-07-26 19:31:23 +0200 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2013-07-26 19:31:23 +0200 |
commit | aa78bf36c75d2002b61d6a4d6e046a07cdf56b09 (patch) | |
tree | c71240f69c04fdfafa678127e8fbb393b6db26e6 /tb3 | |
parent | 80c0ea235f2d6130b98ce4fff7e7e7d602df8fd1 (diff) |
test duration store
Diffstat (limited to 'tb3')
-rwxr-xr-x | tb3/tests/tb3/repostate.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tb3/tests/tb3/repostate.py b/tb3/tests/tb3/repostate.py index f69c372..c40c60c 100755 --- a/tb3/tests/tb3/repostate.py +++ b/tb3/tests/tb3/repostate.py @@ -65,7 +65,12 @@ class TestRepoHistory(unittest.TestCase): self.assertEqual(self.history.get_commit_state(self.head), commitstate) with self.assertRaises(AttributeError): self.history.set_commit_state(self.head, tb3.repostate.CommitState('foo!')) - + def test_duration(self): + commitstate = tb3.repostate.CommitState(estimated_duration=datetime.timedelta(hours=3, minutes=14)) + self.history.set_commit_state(self.head, commitstate) + commitstate = self.history.get_commit_state(self.head) + self.assertEqual(commitstate.estimated_duration, datetime.timedelta(hours=3, minutes=14)) + class TestRepoUpdater(unittest.TestCase): def __resolve_ref(self, refname): return self.git('show-ref', refname).split(' ')[0] |