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

            @hooks.subscribe(event='test')
            def test_hookA(_, p):
                self.fired |= 1
예제 #2
0
 class TestClass(object):
     hooks = panglery.Pangler()
     p = panglery.PanglerAggregate('hooks')
예제 #3
0
 class TestClass(object):
     p = panglery.PanglerAggregate('hooks', None)
예제 #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)