linux: integration-test: Update test case for "state_all_discharging" support

Updates the "test_battery_ac" test case with the changes introduced by
the addition of the "state_all_discharging" field.

Namely, we now assert that the "OnBattery" property is False while
still checking that the correct "WarningLevel" property is set.
This commit is contained in:
initramfs 2025-04-08 22:47:20 +00:00
parent 485ca6f20e
commit a86d2d059c
No known key found for this signature in database
GPG key ID: 0BF5E22B0D6B4C3B

View file

@ -681,7 +681,7 @@ class Tests(dbusmock.DBusTestCase):
self.start_daemon() self.start_daemon()
devs = self.proxy.EnumerateDevices() devs = self.proxy.EnumerateDevices()
self.assertEqual(len(devs), 2) self.assertEqual(len(devs), 2)
self.assertEqual(self.get_dbus_property("OnBattery"), True) self.assertEqual(self.get_dbus_property("OnBattery"), False)
self.assertEqual( self.assertEqual(
self.get_dbus_display_property("WarningLevel"), UP_DEVICE_LEVEL_CRITICAL self.get_dbus_display_property("WarningLevel"), UP_DEVICE_LEVEL_CRITICAL
) )