From f0aa4e2d887d856354fbfd9478fc0b52593ff043 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Sun, 25 Aug 2024 15:07:36 +0200 Subject: [PATCH] =?UTF-8?q?tests:=20Skip=20TestNetworkManager::test=5Fone?= =?UTF-8?q?=5Fwifi=5Fwith=5Faccesspoints=20with=20NM=20=E2=89=A5=201.49.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See #216 --- tests/test_networkmanager.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/test_networkmanager.py b/tests/test_networkmanager.py index 12939d5..d0a49b1 100644 --- a/tests/test_networkmanager.py +++ b/tests/test_networkmanager.py @@ -17,6 +17,7 @@ import sys import tracemalloc import unittest +from packaging.version import Version import dbus import dbus.mainloop.glib @@ -171,6 +172,14 @@ def test_one_wifi_with_accesspoints(self): self.assertRegex(res.stderr, b"No network.*nonexisting") self.assertRegex(self.read_device(), r"wlan0.*\sconnected\s+--") + # TODO: for connecting to password protected Wifi we need to implement secrets agent + # https://github.com/martinpitt/python-dbusmock/issues/216 + out = subprocess.check_output(["nmcli", "--version"], universal_newlines=True) + m = re.search(r"([1-9.]+)", out) + assert m, "could not parse version from " + out + if Version(m.group(1)) >= Version("1.49.3"): + self.skipTest("https://github.com/martinpitt/python-dbusmock/issues/216") + # connect to existing wifi with password subprocess.check_call( ["timeout", "--signal=KILL", "5", "nmcli", "dev", "wifi", "connect", "AP_3", "password", "s3kr1t"]