Comment 2 for bug 1191164

Revision history for this message
Leo Arias (elopio) wrote :

With this I can make the test pass:

=== modified file 'autopilot/introspection/dbus.py'
--- autopilot/introspection/dbus.py 2013-05-23 23:09:52 +0000
+++ autopilot/introspection/dbus.py 2013-06-14 21:43:14 +0000
@@ -475,6 +475,8 @@
         name = get_classname_from_path(path)
         try:
             class_type = _object_registry[cls._id][name]
+ class_type = type(
+ str(name), (class_type,), {'_Backend': cls._Backend})
         except KeyError:
             logger.warning("Generating introspection instance for type '%s' based on generic class.", name)
             # override the _id attr from cls, since we don't want generated types

But it makes the other two fail, so I left it worse than before :D