martinpitt / umockdev

Mock hardware devices for creating unit tests and bug reporting

Home Page:https://launchpad.net/umockdev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to emulate wireless device battery?

DemosKadi opened this issue · comments

Hey, I'm writing a small library which is basically wrapping upower and umockdev seems perfect for testing. The only problem I have is, that I can not figure out how to emulate for example a bluetooth mouse so that upower recognizes it as a wireless device.
I even used umockdev-record on my Logitech Mx Master but upower still only sees a battery.
Could anyone help me with this?

I would suggest just emulating upower itself using python-dbusmock.

In this case, it might be that you need to go through bluetoothd actually.

Thanks python-dbusmock looks like it would be exactly what I need