コード例 #1
0
ファイル: test_gce.py プロジェクト: ssprasad100/omni
 def test_delete_network_postcommit(self, mock_delete, mock_wait):
     mock_delete.side_effect = gce_mock.delete_anything
     mock_wait.side_effect = gce_mock.wait_for_operation
     self.assertIsNone(self._driver.delete_network_postcommit(self.context))
     mock_wait.assert_called_once_with(self._driver.gce_svc,
                                       self._driver.gce_project,
                                       gce_mock.fake_operation())
コード例 #2
0
ファイル: test_gce.py プロジェクト: ssprasad100/omni
 def test_create_sg_rule(self, mock_create, mock_wait):
     mock_create.side_effect = gce_mock.create_anything
     mock_wait.side_effect = gce_mock.wait_for_operation
     sg_rule = self.get_fake_sg_rule()
     self.assertIsNone(
         self._driver._create_secgrp_rule(self.context, sg_rule,
                                          NETWORK_LINK))
     mock_wait.assert_called_once_with(self._driver.gce_svc,
                                       self._driver.gce_project,
                                       gce_mock.fake_operation())