diff --git a/tests/modules/vpcs/test_vpcs_vm.py b/tests/modules/vpcs/test_vpcs_vm.py index 14a1e84b..2848139f 100644 --- a/tests/modules/vpcs/test_vpcs_vm.py +++ b/tests/modules/vpcs/test_vpcs_vm.py @@ -79,6 +79,12 @@ def test_start(loop, vm): def test_stop(loop, vm): process = MagicMock() + + # Wait process kill success + future = asyncio.Future() + future.set_result(True) + process.wait.return_value = future + with asyncio_patch("gns3server.modules.vpcs.vpcs_vm.VPCSVM._check_requirements", return_value=True): with asyncio_patch("asyncio.create_subprocess_exec", return_value=process): nio = VPCS.instance().create_nio(vm.vpcs_path, {"type": "nio_udp", "lport": 4242, "rport": 4243, "rhost": "127.0.0.1"}) @@ -92,6 +98,12 @@ def test_stop(loop, vm): def test_reload(loop, vm): process = MagicMock() + + # Wait process kill success + future = asyncio.Future() + future.set_result(True) + process.wait.return_value = future + with asyncio_patch("gns3server.modules.vpcs.vpcs_vm.VPCSVM._check_requirements", return_value=True): with asyncio_patch("asyncio.create_subprocess_exec", return_value=process): nio = VPCS.instance().create_nio(vm.vpcs_path, {"type": "nio_udp", "lport": 4242, "rport": 4243, "rhost": "127.0.0.1"}) diff --git a/tests/test_main.py b/tests/test_main.py index ed9006b3..645fd87a 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -27,7 +27,10 @@ from gns3server.version import __version__ def test_locale_check(): - locale.setlocale(locale.LC_ALL, ("fr_FR")) + try: + locale.setlocale(locale.LC_ALL, ("fr_FR")) + except: # Locale is not available on the server + return main.locale_check() assert locale.getlocale() == ('fr_FR', 'UTF-8')