Skip to content

Commit

Permalink
tests: Skip TestNetworkManager::test_one_wifi_with_accesspoints with …
Browse files Browse the repository at this point in the history
…NM ≥ 1.49.3

See #216
  • Loading branch information
martinpitt committed Aug 25, 2024
1 parent f73164a commit f0aa4e2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/test_networkmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import sys
import tracemalloc
import unittest
from packaging.version import Version

import dbus
import dbus.mainloop.glib
Expand Down Expand Up @@ -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"]
Expand Down

0 comments on commit f0aa4e2

Please sign in to comment.