Skip to content

Commit

Permalink
fixed tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
jimbr70 committed Oct 6, 2017
1 parent 7d33b7b commit 1f2dfa1
Showing 1 changed file with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import unittest
from mock import patch, Mock, call
from sandbox_scripts.environment.setupS.setup_VM import EnvironmentSetupVM
from sandbox_scripts.environment.setup.setup_VM import EnvironmentSetupVM
from sandbox_scripts.QualiEnvironmentUtils.QualiUtils import QualiError
from cloudshell.api.common_cloudshell_api import CloudShellAPIError
from cloudshell.api.cloudshell_api import ResourceInfoVmDetails
Expand All @@ -25,7 +25,7 @@

class SetupVMTests(unittest.TestCase):

@patch('sandbox_scripts.environment.setupS.setup_VM.get_qs_logger')
@patch('sandbox_scripts.environment.setup.setup_VM.get_qs_logger')
def setUp(self, mock_logger):
os.environ['reservationContext'] = resContext
os.environ['qualiConnectivityContext'] = conContext
Expand All @@ -35,8 +35,8 @@ def tearDown(self):
pass

@patch('cloudshell.helpers.scripts.cloudshell_scripts_helpers.get_api_session')
@patch('sandbox_scripts.environment.setupS.setup_VM.SandboxBase')
@patch('sandbox_scripts.environment.setupS.setup_VM.SaveRestoreManager')
@patch('sandbox_scripts.environment.setup.setup_VM.SandboxBase')
@patch('sandbox_scripts.environment.setup.setup_VM.SaveRestoreManager')
def test_setup_vm_with_no_resources(self, mock_save, mock_sandboxbase, mock_api_session):

self.setup_script.execute()
Expand All @@ -46,8 +46,8 @@ def test_setup_vm_with_no_resources(self, mock_save, mock_sandboxbase, mock_api_
mock_sandboxbase.return_value.report_info.assert_has_calls(report_info_calls)

@patch('cloudshell.helpers.scripts.cloudshell_scripts_helpers.get_api_session')
@patch('sandbox_scripts.environment.setupS.setup_VM.SandboxBase')
@patch('sandbox_scripts.environment.setupS.setup_VM.SaveRestoreManager')
@patch('sandbox_scripts.environment.setup.setup_VM.SandboxBase')
@patch('sandbox_scripts.environment.setup.setup_VM.SaveRestoreManager')
def test_setup_vm_with_regular_resource(self, mock_save, mock_sandboxbase, mock_api_session):

rdi = Mock()
Expand Down Expand Up @@ -82,8 +82,8 @@ def resource_details_mock_side_effect(name):


@patch('cloudshell.helpers.scripts.cloudshell_scripts_helpers.get_api_session')
@patch('sandbox_scripts.environment.setupS.setup_VM.SandboxBase')
@patch('sandbox_scripts.environment.setupS.setup_VM.SaveRestoreManager')
@patch('sandbox_scripts.environment.setup.setup_VM.SandboxBase')
@patch('sandbox_scripts.environment.setup.setup_VM.SaveRestoreManager')
def test_setup_vm_with_static_app_resource_power_on_no_wait_for_ip(self, mock_save, mock_sandboxbase, mock_api_session):
rdi = Mock()
resource1 = Mock()
Expand Down Expand Up @@ -131,8 +131,8 @@ def resource_details_mock_side_effect(name):


@patch('cloudshell.helpers.scripts.cloudshell_scripts_helpers.get_api_session')
@patch('sandbox_scripts.environment.setupS.setup_VM.SandboxBase')
@patch('sandbox_scripts.environment.setupS.setup_VM.SaveRestoreManager')
@patch('sandbox_scripts.environment.setup.setup_VM.SandboxBase')
@patch('sandbox_scripts.environment.setup.setup_VM.SaveRestoreManager')
def test_setup_vm_with_deployed_app_resource(self, mock_save, mock_sandboxbase, mock_api_session):
rdi = Mock()
resource1 = Mock()
Expand Down

0 comments on commit 1f2dfa1

Please sign in to comment.