Esempio n. 1
0
 def test_it_custom_factory(self):
     from pyramid_layout.config import create_layout_manager as fut
     event = mock.Mock()
     fut(event)
     factory = event.request.registry.queryUtility.return_value
     factory.assert_called_once_with(event.request.context, event.request)
     self.assertEqual(event.request.layout_manager, factory.return_value)
Esempio n. 2
0
 def call_fut(self, config, *args, **kw):
     from pyramid_layout.config import add_layout as fut
     return fut(config, *args, **kw)