def test_get_vnc_port(self): fake_vms = self._create_fake_vms() self.flags(vnc_port=5900, group='vmware') self.flags(vnc_port_total=10000, group='vmware') actual = vm_util.get_vnc_port( fake.FakeObjectRetrievalSession(fake_vms)) self.assertEqual(actual, 5910)
def test_get_vnc_port(self): fake_vms = self._create_fake_vms() self.flags(vnc_port=5900, group="vmware") self.flags(vnc_port_total=10000, group="vmware") actual = vm_util.get_vnc_port(fake_session(fake_vms)) self.assertEqual(actual, 5910)