(Title was: \"How to write a unit test for a DBUS service written in Python?\")
I\'ve started to write a DBUS service using dbus-python, but I\'m having trouble writ
You just need to make sure you are handling your main loop properly.
def refresh_ui():
while gtk.events_pending():
gtk.main_iteration_do(False)
This will run the gtk main loop until it has finished processing everything, rather than just run it and block.
For a complete example of it in practise, unit testing a dbus interface, go here: http://pida.co.uk/trac/browser/pida/editors/vim/test_pidavim.py