linux: Add a serial number to mouse battery test

Which will fail, as the device code doesn't even try to get a serial
number.
This commit is contained in:
Bastien Nocera 2017-01-24 18:08:24 +01:00
parent efe589a8ce
commit d5c05515a8

View file

@ -804,6 +804,7 @@ class Tests(unittest.TestCase):
'online', '1',
'status', 'Discharging',
'capacity', '30',
'serial_number', '123456',
'model_name', 'Fancy Logitech mouse'],
[])
@ -817,6 +818,7 @@ class Tests(unittest.TestCase):
self.assertEqual(self.get_dbus_dev_property(mousebat0_up, 'PowerSupply'), False)
# 5 == mouse
self.assertEqual(self.get_dbus_dev_property(mousebat0_up, 'Type'), 5)
self.assertEqual(self.get_dbus_dev_property(mousebat0_up, 'Serial'), '123456')
self.assertEqual(self.get_dbus_property('OnBattery'), False)
self.assertEqual(self.get_dbus_display_property('WarningLevel'), UP_DEVICE_LEVEL_NONE)
self.stop_daemon()