Example #1
0
 def setUp(self):
     self.factory = stubs.FactoryStub()
     self.vm = stubs.VirtualMachineStub(self.factory, "test_vm")
     self.disk = DiskStub(self.vm, "hda")
Example #2
0
 def setUp(self):
     self.factory = stubs.FactoryStub()
     self.vm = stubs.VirtualMachineStub(self.factory, "vm")
     self.image_path = os.path.abspath(self.mktemp())
     self.image = vm.Image("test", self.image_path)
     self.vm.get("hda").set_image(self.image)
Example #3
0
 def test_has_valid_path2(self):
     factory = stubs.FactoryStub()
     vm = stubs.VirtualMachineStub(factory, "vm")
     sock = vm.add_sock()
     self.assertTrue(sock.has_valid_path())