diff options
| author | Robert Collins <robertc@robertcollins.net> | 2012-12-18 09:26:24 +1300 |
|---|---|---|
| committer | Robert Collins <robertc@robertcollins.net> | 2012-12-18 09:26:24 +1300 |
| commit | ef5d2af7f2d09d5b7ce8fe632e6773882ad5ac58 (patch) | |
| tree | 898122f62089545bb5232c1322826ba06ef6b982 /nova/tests | |
| parent | aaae75dc3568ba95d4db5478b1c92eec454356f4 (diff) | |
Move TimeOverride to the general reusable-test-helper place.
Change-Id: Ife5355252813f9b14d5b3f8b543649b88a92acb9
Diffstat (limited to 'nova/tests')
| -rw-r--r-- | nova/tests/consoleauth/test_consoleauth.py | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/nova/tests/consoleauth/test_consoleauth.py b/nova/tests/consoleauth/test_consoleauth.py index 1490028ca..8db72221e 100644 --- a/nova/tests/consoleauth/test_consoleauth.py +++ b/nova/tests/consoleauth/test_consoleauth.py @@ -20,7 +20,6 @@ Tests for Consoleauth Code. """ -import fixtures import time from nova.consoleauth import manager @@ -32,15 +31,6 @@ from nova import test LOG = logging.getLogger(__name__) -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) - - class ConsoleauthTestCase(test.TestCase): """Test Case for consoleauth.""" @@ -51,7 +41,7 @@ class ConsoleauthTestCase(test.TestCase): def test_tokens_expire(self): """Test that tokens expire correctly.""" - self.useFixture(TimeOverride()) + self.useFixture(test.TimeOverride()) token = 'mytok' self.flags(console_token_ttl=1) self.manager.authorize_console(self.context, token, 'novnc', |
