def test_factory_as_object(self): config = self._makeOne() def _fakeAction(discriminator, callable=None, args=(), kw=None, order=0, introspectables=(), **extra): self.assertEqual(len(introspectables), 1) self.assertEqual(introspectables[0]['name'], 'testing') self.assertEqual(introspectables[0]['factory'], DummyPredicate) config.action = _fakeAction config._add_predicate('route', 'testing', DummyPredicate)
def test_factory_as_object(self): config = self._makeOne() def _fakeAction( discriminator, callable=None, args=(), kw=None, order=0, introspectables=(), **extra ): self.assertEqual(len(introspectables), 1) self.assertEqual(introspectables[0]['name'], 'testing') self.assertEqual(introspectables[0]['factory'], DummyPredicate) config.action = _fakeAction config._add_predicate('route', 'testing', DummyPredicate)