summaryrefslogtreecommitdiff
path: root/tb3
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2013-07-26 19:46:45 +0200
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2013-07-26 19:46:45 +0200
commit0f9f3bedf75acb6e7ffdcbf87b85cb5bbb8f150f (patch)
treef6bf6784bf673c8d30374812d9276e8a8954027d /tb3
parentaa78bf36c75d2002b61d6a4d6e046a07cdf56b09 (diff)
test time storage too
Diffstat (limited to 'tb3')
-rwxr-xr-xtb3/tests/tb3/repostate.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tb3/tests/tb3/repostate.py b/tb3/tests/tb3/repostate.py
index c40c60c..436c3f3 100755
--- a/tb3/tests/tb3/repostate.py
+++ b/tb3/tests/tb3/repostate.py
@@ -70,6 +70,13 @@ class TestRepoHistory(unittest.TestCase):
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))
+ def test_times(self):
+ now = datetime.datetime.now()
+ commitstate = tb3.repostate.CommitState(started=now, finished=now)
+ self.history.set_commit_state(self.head, commitstate)
+ commitstate = self.history.get_commit_state(self.head)
+ self.assertEqual(commitstate.started, now)
+ self.assertEqual(commitstate.finished, now)
class TestRepoUpdater(unittest.TestCase):
def __resolve_ref(self, refname):