Exemple #1
0
 def test_start(self):
     '''
         Test to reboot a domain via ACPI request
     '''
     mock = MagicMock(return_value=True)
     with patch.object(xapi, "create", mock):
         self.assertTrue(xapi.start("salt"))
Exemple #2
0
 def test_start(self):
     '''
         Test to reboot a domain via ACPI request
     '''
     mock = MagicMock(return_value=True)
     with patch.object(xapi, "start", mock):
         self.assertTrue(xapi.start("salt"))
Exemple #3
0
 def test_create(self):
     '''
         Test to start a defined domain
     '''
     mock = MagicMock(return_value=True)
     with patch.dict(xapi.__salt__, {'cmd.run': mock}):
         self.assertTrue(xapi.start("salt"))