示例#1
0
 def test_server_poweroff(self):
     '''
     Tests for powers down the managed server.
     '''
     mock = MagicMock(return_value=True)
     with patch.object(drac, '__execute_cmd', mock):
         self.assertTrue(drac.server_poweroff())
示例#2
0
文件: drac_test.py 项目: DaveQB/salt
 def test_server_poweroff(self):
     '''
     Tests for powers down the managed server.
     '''
     mock = MagicMock(return_value=True)
     with patch.object(drac, '__execute_cmd', mock):
         self.assertTrue(drac.server_poweroff())