コード例 #1
0
 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'))
コード例 #2
0
ファイル: nova_test.py プロジェクト: DaveQB/salt
 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'))
コード例 #3
0
 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"))