Merge pull request #107 from chmouel/master

Fix unit-tests
This commit is contained in:
Chmouel Boudjnah 2011-09-02 07:44:39 -07:00
commit ba96890aae

@ -28,7 +28,12 @@ class ShellTest(utils.TestCase):
def tearDown(self):
os.environ = self.old_environment
self.shell.cs.clear_callstack()
# For some method like test_image_meta_bad_action we are
# testing a SystemExit to be thrown and object self.shell has
# no time to get instantatiated which is OK in this case, so
# we make sure the method is there before launching it.
if hasattr(self.shell, 'cs'):
self.shell.cs.clear_callstack()
def run_command(self, cmd):
self.shell.main(cmd.split())