diff options
| author | Jenkins <jenkins@review.openstack.org> | 2015-01-27 19:53:44 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2015-01-27 19:53:44 +0000 |
| commit | 2c03f6f42fc17ca145e527cc87a7c2e7043e32c7 (patch) | |
| tree | 35f52da4fb531570acb842fa80f4a71cb9c5983a /openstackclient/tests/test_shell.py | |
| parent | 520b2f10cf0218509ca6cab7439214be812b425e (diff) | |
| parent | 127af151ff60d11e7b2f88555678cf18b8828e48 (diff) | |
| download | python-openstackclient-2c03f6f42fc17ca145e527cc87a7c2e7043e32c7.tar.gz | |
Merge "fix the wrong order of assertEqual args"
Diffstat (limited to 'openstackclient/tests/test_shell.py')
| -rw-r--r-- | openstackclient/tests/test_shell.py | 86 |
1 files changed, 43 insertions, 43 deletions
diff --git a/openstackclient/tests/test_shell.py b/openstackclient/tests/test_shell.py index 8656d089..f1043072 100644 --- a/openstackclient/tests/test_shell.py +++ b/openstackclient/tests/test_shell.py @@ -82,34 +82,34 @@ class TestShell(utils.TestCase): fake_execute(_shell, _cmd) self.app.assert_called_with(["list", "project"]) - self.assertEqual(_shell.options.os_auth_url, - default_args["auth_url"]) - self.assertEqual(_shell.options.os_project_id, - default_args["project_id"]) - self.assertEqual(_shell.options.os_project_name, - default_args["project_name"]) - self.assertEqual(_shell.options.os_domain_id, - default_args["domain_id"]) - self.assertEqual(_shell.options.os_domain_name, - default_args["domain_name"]) - self.assertEqual(_shell.options.os_user_domain_id, - default_args["user_domain_id"]) - self.assertEqual(_shell.options.os_user_domain_name, - default_args["user_domain_name"]) - self.assertEqual(_shell.options.os_project_domain_id, - default_args["project_domain_id"]) - self.assertEqual(_shell.options.os_project_domain_name, - default_args["project_domain_name"]) - self.assertEqual(_shell.options.os_username, - default_args["username"]) - self.assertEqual(_shell.options.os_password, - default_args["password"]) - self.assertEqual(_shell.options.os_region_name, - default_args["region_name"]) - self.assertEqual(_shell.options.os_trust_id, - default_args["trust_id"]) - self.assertEqual(_shell.options.os_auth_type, - default_args['auth_type']) + self.assertEqual(default_args["auth_url"], + _shell.options.os_auth_url) + self.assertEqual(default_args["project_id"], + _shell.options.os_project_id) + self.assertEqual(default_args["project_name"], + _shell.options.os_project_name) + self.assertEqual(default_args["domain_id"], + _shell.options.os_domain_id) + self.assertEqual(default_args["domain_name"], + _shell.options.os_domain_name) + self.assertEqual(default_args["user_domain_id"], + _shell.options.os_user_domain_id) + self.assertEqual(default_args["user_domain_name"], + _shell.options.os_user_domain_name) + self.assertEqual(default_args["project_domain_id"], + _shell.options.os_project_domain_id) + self.assertEqual(default_args["project_domain_name"], + _shell.options.os_project_domain_name) + self.assertEqual(default_args["username"], + _shell.options.os_username) + self.assertEqual(default_args["password"], + _shell.options.os_password) + self.assertEqual(default_args["region_name"], + _shell.options.os_region_name) + self.assertEqual(default_args["trust_id"], + _shell.options.os_trust_id) + self.assertEqual(default_args['auth_type'], + _shell.options.os_auth_type) def _assert_token_auth(self, cmd_options, default_args): with mock.patch("openstackclient.shell.OpenStackShell.initialize_app", @@ -118,9 +118,9 @@ class TestShell(utils.TestCase): fake_execute(_shell, _cmd) self.app.assert_called_with(["list", "role"]) - self.assertEqual(_shell.options.os_token, default_args["os_token"]) - self.assertEqual(_shell.options.os_auth_url, - default_args["os_auth_url"]) + self.assertEqual(default_args["os_token"], _shell.options.os_token) + self.assertEqual(default_args["os_auth_url"], + _shell.options.os_auth_url) def _assert_cli(self, cmd_options, default_args): with mock.patch("openstackclient.shell.OpenStackShell.initialize_app", @@ -129,16 +129,16 @@ class TestShell(utils.TestCase): fake_execute(_shell, _cmd) self.app.assert_called_with(["list", "server"]) - self.assertEqual(_shell.options.os_compute_api_version, - default_args["compute_api_version"]) - self.assertEqual(_shell.options.os_identity_api_version, - default_args["identity_api_version"]) - self.assertEqual(_shell.options.os_image_api_version, - default_args["image_api_version"]) - self.assertEqual(_shell.options.os_volume_api_version, - default_args["volume_api_version"]) - self.assertEqual(_shell.options.os_network_api_version, - default_args["network_api_version"]) + self.assertEqual(default_args["compute_api_version"], + _shell.options.os_compute_api_version) + self.assertEqual(default_args["identity_api_version"], + _shell.options.os_identity_api_version) + self.assertEqual(default_args["image_api_version"], + _shell.options.os_image_api_version) + self.assertEqual(default_args["volume_api_version"], + _shell.options.os_volume_api_version) + self.assertEqual(default_args["network_api_version"], + _shell.options.os_network_api_version) class TestShellHelp(TestShell): @@ -161,8 +161,8 @@ class TestShellHelp(TestShell): _shell, _cmd = make_shell(), flag fake_execute(_shell, _cmd) - self.assertEqual(_shell.options.deferred_help, - kwargs["deferred_help"]) + self.assertEqual(kwargs["deferred_help"], + _shell.options.deferred_help) class TestShellPasswordAuth(TestShell): |
