def setUp(self): self.factory = stubs.FactoryStub() self.vm = stubs.VirtualMachineStub(self.factory, "test_vm") self.disk = DiskStub(self.vm, "hda")
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)
def test_has_valid_path2(self): factory = stubs.FactoryStub() vm = stubs.VirtualMachineStub(factory, "vm") sock = vm.add_sock() self.assertTrue(sock.has_valid_path())