From b3c439ab4aa086f4e42cc9b5f3d73e48c0346641 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Fri, 14 Apr 2023 13:50:49 +0200 Subject: linux: Fix getting properties in assertDevs() Now that device loop is fixed, we also need to fix the D-Bus object path for the devices themselves to match what UPower generates so we can get its properties. As we iterate over the expected array, the elements are the basenames of those object paths. Reconstruct the full object paths by prepending /org/freedesktop/UPower/devices/ --- src/linux/integration-test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/linux/integration-test.py b/src/linux/integration-test.py index b04454c..42bf736 100755 --- a/src/linux/integration-test.py +++ b/src/linux/integration-test.py @@ -290,7 +290,7 @@ class Tests(dbusmock.DBusTestCase): self.assertEqual(names, sorted(expected.keys())) for n in names: - props = self.get_dbus_dev_properties(n) + props = self.get_dbus_dev_properties('/org/freedesktop/UPower/devices/' + n) for k, v in expected[n].items(): self.assertEqual(props[k], v, msg=f'Property "{k}" of "{n}" should be {v} but is {props[k]}') -- cgit v1.2.1