コード例 #1
0
 def test_delete(self, mock_auth):
     '''
     Test for Delete an instance
     '''
     mock_auth.side_effect = MagicMock()
     with patch.object(mock_auth, 'delete', MagicMock(return_value='A')):
         self.assertTrue(nova.delete('instance_id'))
コード例 #2
0
ファイル: nova_test.py プロジェクト: DaveQB/salt
 def test_delete(self, mock_auth):
     '''
     Test for Delete an instance
     '''
     mock_auth.side_effect = MagicMock()
     with patch.object(mock_auth,
                       'delete', MagicMock(return_value='A')):
         self.assertTrue(nova.delete('instance_id'))
コード例 #3
0
 def test_delete(self):
     """
     Test for Delete an instance
     """
     self.mock_auth.side_effect = MagicMock()
     with patch.object(self.mock_auth, "delete",
                       MagicMock(return_value="A")):
         self.assertTrue(nova.delete("instance_id"))