Skip to content

Commit

Permalink
Fix shell tests
Browse files Browse the repository at this point in the history
Personally, I think these tests should be removed, they are
testing OCC.  An internal OCC change on a private method broke
this test.

Change-Id: I760bf90ef8bd97e30be7838874337be695d45285
  • Loading branch information
TerryHowe committed May 28, 2015
1 parent e8655f4 commit 211c14c
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions openstackclient/tests/test_shell.py
Expand Up @@ -559,7 +559,7 @@ def test_empty_env(self):

@mock.patch("os_client_config.config.OpenStackConfig._load_config_file")
def test_shell_args_cloud_no_vendor(self, config_mock):
config_mock.return_value = copy.deepcopy(CLOUD_1)
config_mock.return_value = ('file.yaml', copy.deepcopy(CLOUD_1))
_shell = make_shell()

fake_execute(
Expand Down Expand Up @@ -596,8 +596,8 @@ def test_shell_args_cloud_no_vendor(self, config_mock):
@mock.patch("os_client_config.config.OpenStackConfig._load_vendor_file")
@mock.patch("os_client_config.config.OpenStackConfig._load_config_file")
def test_shell_args_cloud_public(self, config_mock, public_mock):
config_mock.return_value = copy.deepcopy(CLOUD_2)
public_mock.return_value = copy.deepcopy(PUBLIC_1)
config_mock.return_value = ('file.yaml', copy.deepcopy(CLOUD_2))
public_mock.return_value = ('file.yaml', copy.deepcopy(PUBLIC_1))
_shell = make_shell()

fake_execute(
Expand Down Expand Up @@ -636,8 +636,8 @@ def test_shell_args_cloud_public(self, config_mock, public_mock):
@mock.patch("os_client_config.config.OpenStackConfig._load_vendor_file")
@mock.patch("os_client_config.config.OpenStackConfig._load_config_file")
def test_shell_args_precedence(self, config_mock, vendor_mock):
config_mock.return_value = copy.deepcopy(CLOUD_2)
vendor_mock.return_value = copy.deepcopy(PUBLIC_1)
config_mock.return_value = ('file.yaml', copy.deepcopy(CLOUD_2))
vendor_mock.return_value = ('file.yaml', copy.deepcopy(PUBLIC_1))
_shell = make_shell()

# Test command option overriding config file value
Expand Down Expand Up @@ -690,8 +690,8 @@ def tearDown(self):
@mock.patch("os_client_config.config.OpenStackConfig._load_vendor_file")
@mock.patch("os_client_config.config.OpenStackConfig._load_config_file")
def test_shell_args_precedence_1(self, config_mock, vendor_mock):
config_mock.return_value = copy.deepcopy(CLOUD_2)
vendor_mock.return_value = copy.deepcopy(PUBLIC_1)
config_mock.return_value = ('file.yaml', copy.deepcopy(CLOUD_2))
vendor_mock.return_value = ('file.yaml', copy.deepcopy(PUBLIC_1))
_shell = make_shell()

# Test env var
Expand Down Expand Up @@ -731,8 +731,8 @@ def test_shell_args_precedence_1(self, config_mock, vendor_mock):
@mock.patch("os_client_config.config.OpenStackConfig._load_vendor_file")
@mock.patch("os_client_config.config.OpenStackConfig._load_config_file")
def test_shell_args_precedence_2(self, config_mock, vendor_mock):
config_mock.return_value = copy.deepcopy(CLOUD_2)
vendor_mock.return_value = copy.deepcopy(PUBLIC_1)
config_mock.return_value = ('file.yaml', copy.deepcopy(CLOUD_2))
vendor_mock.return_value = ('file.yaml', copy.deepcopy(PUBLIC_1))
_shell = make_shell()

# Test command option overriding config file value
Expand Down

0 comments on commit 211c14c

Please sign in to comment.