def _vmngr(self): vmngr = getattr(self, '__vmngr', None) if vmngr is None: vmngr = VersionMgr(log=self._logger) [setattr(vmngr, n, c) for n, c in self._callbacks.items()] [vmngr.register(ev, val[0], val[1]) for ev, val in self._registries.items()] setattr(self, '__vmngr', vmngr) return vmngr
def setUp(self): ''' Given that nosetests test isolation is "incompatible" with w3af's kb, cf, etc. objects, and the tests written here are overwriting some classes that are loaded into sys.modules and then used in other code sections -and tests-, I need to clean the mess after I finish. @see: http://mousebender.wordpress.com/2006/12/07/test-isolation-in-nose/ I haven't been able to fix this issue... so I'm skipping these two tests! ''' self.vmgr = VersionMgr(W3AF_LOCAL_PATH, MagicMock(return_value=None))