def test_unweave(self):
     """Tests that unweaving() cancels confirmation"""
     weaver.unweave_pointcut(self.pcut, ConfirmationConcreteAspect)
     self.guy.set_paranoid()
     self.guy.jump()
     self.assertEquals(self.guy.status, 'jumped',
                       "The guy should have jumped")
Exemple #2
0
 def test_unweave(self):
     """Tests that unweaving() cancels confirmation"""
     weaver.unweave_pointcut(self.pcut, ConfirmationConcreteAspect)
     self.guy.set_paranoid()
     self.guy.jump()
     self.assertEquals(self.guy.status, 'jumped',
                       "The guy should have jumped")
 def test_unweave_pointcut(self):
     """tests unweave() for pointcuts"""
     pcut = PointCut()
     pcut.add_method(self.klass, 'foo')
     weaver.weave_pointcut(pcut, ContractAspect)
     self.assertEquals(len(weaver.get_aspects(self.klass, 'foo')), 1)
     weaver.unweave_pointcut(pcut, ContractAspect)
     self.assertEquals(weaver.get_aspect(ContractAspect), None)
 def test_unweave_pointcut(self):
     """tests unweave() for pointcuts"""
     pcut = PointCut()
     pcut.add_method(self.klass, 'foo')
     weaver.weave_pointcut(pcut, ContractAspect)
     self.assertEquals(
         len(weaver.get_aspects(self.klass, 'foo')), 1)
     weaver.unweave_pointcut(pcut, ContractAspect)
     self.assertEquals(weaver.get_aspect(ContractAspect), None)
 def test_unweave(self):
     """Tests that unweaving() cancels observation"""
     weaver.unweave_pointcut(self.pcut, ObserverAspect)
     self.assertEquals(self.obs.update_calls, 0)
     self.obj.do_something()
     self.assertEquals(self.obs.update_calls, 0)
Exemple #6
0
 def test_unweave(self):
     """Tests that unweaving() cancels observation"""
     weaver.unweave_pointcut(self.pcut, ObserverAspect)
     self.assertEquals(self.obs.update_calls, 0)
     self.obj.do_something()
     self.assertEquals(self.obs.update_calls, 0)