From cc736ad6265ec8534ea6393270361aae2bc1f153 Mon Sep 17 00:00:00 2001 From: xianming mao Date: Wed, 21 Sep 2016 12:13:22 +0800 Subject: [PATCH] Replace 'MagicMock' with 'Mock' In magicmock,there just have a mock_add_spec function,in this code,there have not called this method so i think it can be removed and call mock directly. Change-Id: Ic3b218eecb5738769dd2c18b6029dc70210d3989 --- cinderclient/tests/unit/test_shell.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cinderclient/tests/unit/test_shell.py b/cinderclient/tests/unit/test_shell.py index 7d6cbaea1..133b3f1c0 100644 --- a/cinderclient/tests/unit/test_shell.py +++ b/cinderclient/tests/unit/test_shell.py @@ -154,7 +154,7 @@ class ShellTest(utils.TestCase): side_effect=ks_exc.ConnectFailure()) @mock.patch('keystoneauth1.discover.Discover', side_effect=ks_exc.ConnectFailure()) - @mock.patch('sys.stdin', side_effect=mock.MagicMock) + @mock.patch('sys.stdin', side_effect=mock.Mock) @mock.patch('getpass.getpass', return_value='password') def test_password_prompted(self, mock_getpass, mock_stdin, mock_discover, mock_token, mock_password):