@@ -56,14 +56,28 @@ def test_instantiate_with_default_name(self):
5656 template = oca .VmTemplate (self .xml , self .client )
5757 template .instantiate ()
5858 self .client .call .assert_called_once_with ('template.instantiate' ,
59- '1' , '' )
59+ '1' , '' , False , '' )
6060
6161 def test_instantiate_with_custom_name (self ):
6262 self .client .call = Mock ()
6363 template = oca .VmTemplate (self .xml , self .client )
6464 template .instantiate ('asd' )
6565 self .client .call .assert_called_once_with ('template.instantiate' ,
66- '1' , 'asd' )
66+ '1' , 'asd' , False , '' )
67+
68+ def test_instantiate_with_default_name_and_context (self ):
69+ self .client .call = Mock ()
70+ template = oca .VmTemplate (self .xml , self .client )
71+ template .instantiate ('' , False , 'VCPU=4' )
72+ self .client .call .assert_called_once_with ('template.instantiate' ,
73+ '1' , '' , False , 'VCPU=4' )
74+
75+ def test_instantiate_with_custom_name_and_context (self ):
76+ self .client .call = Mock ()
77+ template = oca .VmTemplate (self .xml , self .client )
78+ template .instantiate ('asd' , False , 'VCPU=4' )
79+ self .client .call .assert_called_once_with ('template.instantiate' ,
80+ '1' , 'asd' , False , 'VCPU=4' )
6781
6882 def test_repr (self ):
6983 self .client .call = Mock ()
0 commit comments