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
This commit is contained in:
parent
0834b2b58b
commit
cc736ad626
@ -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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user