Example #1
0
        class TestClassA(object):
            hooks = panglery.Pangler()
            p = panglery.PanglerAggregate('hooks')

            @hooks.subscribe(event='test')
            def test_hookA(_, p):
                self.fired |= 1
Example #2
0
 class TestClass(object):
     hooks = panglery.Pangler()
     p = panglery.PanglerAggregate('hooks')
Example #3
0
 class TestClass(object):
     p = panglery.PanglerAggregate('hooks', None)
Example #4
0
 def test_unbound_aggregate(self):
     agg = panglery.PanglerAggregate()
     class TestClass(object):
         p = agg
     self.assertEqual(TestClass.p, agg)
     self.assertEqual(TestClass().p, agg)