Create tests for shell interface

* use unittest2
* shell: command-line options

Change-Id: I558fb10b8607e4f6e5c44d5fcac902546a8748a4
This commit is contained in:
Dean Troyer
2012-06-20 10:05:56 -05:00
parent 697a5ac6cb
commit f9aa3f3c84
3 changed files with 343 additions and 0 deletions

21
tests/utils.py Normal file

@ -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()