Fix test for "start" function

This commit is contained in:
Bo Maryniuk 2015-07-15 19:03:37 +02:00
parent fa5163033e
commit 4040c82515

View File

@ -320,14 +320,14 @@ class XapiTestCase(TestCase):
'''
mock = MagicMock(return_value=True)
with patch.dict(xapi.__salt__, {'cmd.run': mock}):
self.assertTrue(xapi.create("salt"))
self.assertTrue(xapi.start("salt"))
def test_start(self):
'''
Test to reboot a domain via ACPI request
'''
mock = MagicMock(return_value=True)
with patch.object(xapi, "create", mock):
with patch.object(xapi, "start", mock):
self.assertTrue(xapi.start("salt"))
def test_reboot(self):