summaryrefslogtreecommitdiffstats
path: root/nova/test.py
diff options
context:
space:
mode:
authorRobert Collins <robertc@robertcollins.net>2012-12-18 09:26:24 +1300
committerRobert Collins <robertc@robertcollins.net>2012-12-18 09:26:24 +1300
commitef5d2af7f2d09d5b7ce8fe632e6773882ad5ac58 (patch)
tree898122f62089545bb5232c1322826ba06ef6b982 /nova/test.py
parentaaae75dc3568ba95d4db5478b1c92eec454356f4 (diff)
downloadnova-ef5d2af7f2d09d5b7ce8fe632e6773882ad5ac58.tar.gz
nova-ef5d2af7f2d09d5b7ce8fe632e6773882ad5ac58.tar.xz
nova-ef5d2af7f2d09d5b7ce8fe632e6773882ad5ac58.zip
Move TimeOverride to the general reusable-test-helper place.
Change-Id: Ife5355252813f9b14d5b3f8b543649b88a92acb9
Diffstat (limited to 'nova/test.py')
-rw-r--r--nova/test.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/nova/test.py b/nova/test.py
index baeef49c2..08d426874 100644
--- a/nova/test.py
+++ b/nova/test.py
@@ -246,3 +246,12 @@ class APICoverage(object):
self.assertThat(
test_methods,
testtools.matchers.ContainsAll(api_methods))
+
+
+class TimeOverride(fixtures.Fixture):
+ """Fixture to start and remove time override."""
+
+ def setUp(self):
+ super(TimeOverride, self).setUp()
+ timeutils.set_time_override()
+ self.addCleanup(timeutils.clear_time_override)