def test_suspend(self, mock_auth): ''' Test for Suspend an instance ''' mock_auth.side_effect = MagicMock() with patch.object(mock_auth, 'suspend', MagicMock(return_value='A')): self.assertTrue(nova.suspend('instance_id'))
def test_suspend(self): """ Test for Suspend an instance """ self.mock_auth.side_effect = MagicMock() with patch.object(self.mock_auth, "suspend", MagicMock(return_value="A")): self.assertTrue(nova.suspend("instance_id"))