def test_deferred_instance_event_subclass_propagate_baseclass(self):
        users, User = (self.tables.users,
                       self.classes.User)

        class SubUser(User):
            pass

        class SubUser2(User):
            pass

        canary = Mock()
        event.listen(User, "load", canary, propagate=True, raw=False)

        # reversing these fixes....
        m = mapper(SubUser, users)
        m2 = mapper(User, users)

        instance = Mock()
        m.class_manager.dispatch.load(instance)

        eq_(canary.mock_calls, [call(instance.obj())])

        m2.class_manager.dispatch.load(instance)
        eq_(canary.mock_calls, [call(instance.obj()), call(instance.obj())])

        m3 = mapper(SubUser2, users)
        m3.class_manager.dispatch.load(instance)
        eq_(canary.mock_calls, [call(instance.obj()),
                                call(instance.obj()), call(instance.obj())])
1. instance event listen on class, w propagate
dataset/ETHPy150Open zzzeek/sqlalchemy/test/orm/test_events.py/DeferredMapperEventsTest.test_deferred_instance_event_subclass_propagate_baseclass