First pass at adding compute unit tests.

Change-Id: Icf3340d457f75eec89bb0e5c9b4b953c3b81020f
This commit is contained in:
Josh Kearney
2013-01-24 12:33:17 -06:00
committed by Dean Troyer
parent 1bb59c53ee
commit 4297e5781b
5 changed files with 92 additions and 22 deletions

@ -13,10 +13,10 @@
# under the License.
#
import fixtures
import os
import mock
import fixtures
from openstackclient import shell as os_shell
from tests import utils
@ -47,8 +47,7 @@ def make_shell():
return _shell
class ShellTest(utils.TestCase):
class TestShell(utils.TestCase):
FAKE_ENV = {
'OS_AUTH_URL': DEFAULT_AUTH_URL,
'OS_TENANT_ID': DEFAULT_TENANT_ID,
@ -60,7 +59,7 @@ class ShellTest(utils.TestCase):
def setUp(self):
""" Patch os.environ to avoid required auth info"""
super(ShellTest, self).setUp()
super(TestShell, self).setUp()
for var in self.FAKE_ENV:
self.useFixture(
fixtures.EnvironmentVariable(
@ -85,7 +84,7 @@ class ShellTest(utils.TestCase):
def tearDown(self):
#self.auth_patch.stop()
self.cmd_patch.stop()
super(ShellTest, self).tearDown()
super(TestShell, self).tearDown()
def test_shell_args(self):
sh = make_shell()