@@ -40,10 +40,10 @@ def setUp(self):
4040
4141 def test_host_set_no_option (self ):
4242 arglist = [
43- str ( self .host .id )
43+ self .host .host
4444 ]
4545 verifylist = [
46- ('host' , str ( self .host .id ) )
46+ ('host' , self .host .host )
4747 ]
4848
4949 parsed_args = self .check_parser (self .cmd , arglist , verifylist )
@@ -52,24 +52,24 @@ def test_host_set_no_option(self):
5252 self .assertIsNone (result )
5353
5454 body = {}
55- self .host_mock .update .assert_called_with (self .host .id , body )
55+ self .host_mock .update .assert_called_with (self .host .host , body )
5656
5757 def test_host_set (self ):
5858 arglist = [
5959 '--enable' ,
6060 '--disable-maintenance' ,
61- str ( self .host .id )
61+ self .host .host
6262 ]
6363 verifylist = [
6464 ('enable' , True ),
6565 ('enable_maintenance' , False ),
66- ('host' , str ( self .host .id ) )
66+ ('host' , self .host .host )
6767 ]
6868
6969 parsed_args = self .check_parser (self .cmd , arglist , verifylist )
7070
7171 result = self .cmd .take_action (parsed_args )
7272 self .assertIsNone (result )
7373
74- body = {'status' : True , 'maintenance_mode' : False }
75- self .host_mock .update .assert_called_with (self .host .id , body )
74+ body = {'status' : 'enable' , 'maintenance_mode' : 'disable' }
75+ self .host_mock .update .assert_called_with (self .host .host , body )
0 commit comments