From d0d4077e1d88f7f1d4caf58dcfe1b20840c34cd4 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Mon, 13 Nov 2023 17:29:35 +0000 Subject: [PATCH] tests: Remove prints Change-Id: I35adac1199769fd73978b6457044191d02bb5bd4 Signed-off-by: Stephen Finucane --- openstackclient/tests/unit/identity/v3/test_trust.py | 2 -- openstackclient/tests/unit/integ/cli/test_shell.py | 2 -- openstackclient/tests/unit/test_shell.py | 8 +------- 3 files changed, 1 insertion(+), 11 deletions(-) diff --git a/openstackclient/tests/unit/identity/v3/test_trust.py b/openstackclient/tests/unit/identity/v3/test_trust.py index 67e64cea32..8a7903e08e 100644 --- a/openstackclient/tests/unit/identity/v3/test_trust.py +++ b/openstackclient/tests/unit/identity/v3/test_trust.py @@ -294,7 +294,6 @@ class TestTrustList(TestTrust): # containing the data to be listed. columns, data = self.cmd.take_action(parsed_args) - print(self.trusts_mock.list.call_args_list) self.trusts_mock.list.assert_any_call( trustee_user=self.users_mock.get(), trustor_user=None, @@ -335,7 +334,6 @@ class TestTrustList(TestTrust): # containing the data to be listed. columns, data = self.cmd.take_action(parsed_args) - print(self.trusts_mock.list.call_args_list) self.trusts_mock.list.assert_any_call( trustor_user=self.users_mock.get(), trustee_user=None, diff --git a/openstackclient/tests/unit/integ/cli/test_shell.py b/openstackclient/tests/unit/integ/cli/test_shell.py index 9cd7013458..6951c2afc1 100644 --- a/openstackclient/tests/unit/integ/cli/test_shell.py +++ b/openstackclient/tests/unit/integ/cli/test_shell.py @@ -502,7 +502,6 @@ class TestIntegShellCliPrecedenceOCC(test_base.TestInteg): ) # +env, -cli, +occ - print("auth_req: %s" % auth_req['auth']) self.assertEqual( test_shell.DEFAULT_USERNAME, auth_req['auth']['identity']['password']['user']['name'], @@ -559,7 +558,6 @@ class TestIntegShellCliPrecedenceOCC(test_base.TestInteg): ) # +env, +cli, +occ - print("auth_req: %s" % auth_req['auth']) self.assertEqual( 'zarquon', auth_req['auth']['identity']['password']['user']['name'], diff --git a/openstackclient/tests/unit/test_shell.py b/openstackclient/tests/unit/test_shell.py index 4081b670fd..5d4bc6a83a 100644 --- a/openstackclient/tests/unit/test_shell.py +++ b/openstackclient/tests/unit/test_shell.py @@ -141,10 +141,6 @@ class TestShell(osc_lib_test_utils.TestShell): # Full name of the OpenStackShell class to test (cliff.app.App subclass) shell_class_name = "openstackclient.shell.OpenStackShell" - # TODO(dtroyer): remove this once the shell_class_patch patch is released - # in osc-lib - app_patch = shell_class_name - def setUp(self): super(TestShell, self).setUp() # TODO(dtroyer): remove this once the shell_class_patch patch is @@ -162,7 +158,6 @@ class TestShell(osc_lib_test_utils.TestShell): ) _cmd = cmd_options + " list role" osc_lib_test_utils.fake_execute(_shell, _cmd) - print("_shell: %s" % _shell) self.app.assert_called_with(["list", "role"]) self.assertEqual( @@ -178,7 +173,7 @@ class TestShell(osc_lib_test_utils.TestShell): def _assert_token_auth(self, cmd_options, default_args): with mock.patch( - self.app_patch + ".initialize_app", + self.shell_class_name + ".initialize_app", self.app, ): _shell = osc_lib_test_utils.make_shell( @@ -186,7 +181,6 @@ class TestShell(osc_lib_test_utils.TestShell): ) _cmd = cmd_options + " list role" osc_lib_test_utils.fake_execute(_shell, _cmd) - print("_shell: %s" % _shell) self.app.assert_called_with(["list", "role"]) self.assertEqual(