55from mock import Mock , create_autospec
66
77
8-
98class TestCommandOrchestrator (TestCase ):
109 def setUp (self ):
1110 self .resource = create_autospec (ResourceInfo )
@@ -49,31 +48,34 @@ def test_disconnect_all(self):
4948
5049 def test_disconnect (self ):
5150 # act
52- self .command_orchestrator .disconnect (self .context , self .ports , 'network' )
51+ self .command_orchestrator .disconnect (self .context , self .ports , 'network' )
5352 # assert
5453 self .assertTrue (self .command_orchestrator .command_wrapper .execute_command_with_connection .called )
5554
5655 def test_destroy_vm (self ):
5756 # act
58- self .command_orchestrator .destroy_vm (self .context , self .ports )
57+ self .command_orchestrator .destroy_vm (self .context , self .ports )
5958 # assert
6059 self .assertTrue (self .command_orchestrator .command_wrapper .execute_command_with_connection .called )
6160
6261 def test_deploy_from_template (self ):
6362 # act
64- self .command_orchestrator .deploy_from_template (self .context , '{"name": "name", "template_resource_model": {"vcenter_template": ""}}' )
63+ self .command_orchestrator .deploy_from_template (self .context ,
64+ '{"name": "name", "template_resource_model": {"vcenter_template": ""}}' )
6565 # assert
6666 self .assertTrue (self .command_orchestrator .command_wrapper .execute_command_with_connection .called )
6767
6868 def test_deploy_vm_from_vm (self ):
6969 # act
70- self .command_orchestrator .deploy_clone_from_vm (self .context , '{"name": "name", "template_resource_model": {"vcenter_vm": ""}}' )
70+ self .command_orchestrator .deploy_clone_from_vm (self .context ,
71+ '{"name": "name", "template_resource_model": {"vcenter_vm": ""}}' )
7172 # assert
7273 self .assertTrue (self .command_orchestrator .command_wrapper .execute_command_with_connection .called )
7374
7475 def test_deploy_from_snapshot (self ):
7576 # act
76- self .command_orchestrator .deploy_from_linked_clone (self .context , '{"name": "name", "template_resource_model": {"vcenter_vm": "name", "vcenter_vm_snapshot": "snap"}}' )
77+ self .command_orchestrator .deploy_from_linked_clone (self .context ,
78+ '{"name": "name", "template_resource_model": {"vcenter_vm": "name", "vcenter_vm_snapshot": "snap"}}' )
7779 # assert
7880 self .assertTrue (self .command_orchestrator .command_wrapper .execute_command_with_connection .called )
7981
@@ -91,7 +93,7 @@ def test_power_off(self):
9193
9294 def test_power_on (self ):
9395 # act
94- self .command_orchestrator .power_on (self .context , self .ports )
96+ self .command_orchestrator .power_on (self .context , self .ports )
9597 # assert
9698 self .assertTrue (self .command_orchestrator .command_wrapper .execute_command_with_connection .called )
9799
0 commit comments