summaryrefslogtreecommitdiff
path: root/tests/utils.py
diff options
context:
space:
mode:
authorDean Troyer <dtroyer@gmail.com>2012-06-20 10:05:56 -0500
committerDean Troyer <dtroyer@gmail.com>2012-06-22 10:20:04 -0500
commitf9aa3f3c844d35998361aa08e8c4f821b5d0bc90 (patch)
treeab0693cf70102ead599bd35ab6e816717c80b097 /tests/utils.py
parent697a5ac6cba6eb5c59e6b479153f4550c537ac3e (diff)
downloadpython-openstackclient-f9aa3f3c844d35998361aa08e8c4f821b5d0bc90.tar.gz
Create tests for shell interface
* use unittest2 * shell: command-line options Change-Id: I558fb10b8607e4f6e5c44d5fcac902546a8748a4
Diffstat (limited to 'tests/utils.py')
-rw-r--r--tests/utils.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/utils.py b/tests/utils.py
new file mode 100644
index 00000000..3535360d
--- /dev/null
+++ b/tests/utils.py
@@ -0,0 +1,21 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+import time
+
+import mox
+import unittest2
+
+
+class TestCase(unittest2.TestCase):
+
+ def setUp(self):
+ super(TestCase, self).setUp()
+ self.mox = mox.Mox()
+ self._original_time = time.time
+ time.time = lambda: 1234
+
+ def tearDown(self):
+ time.time = self._original_time
+ super(TestCase, self).tearDown()
+ self.mox.UnsetStubs()
+ self.mox.VerifyAll()