示例#1
0
    def test_hyphen_filenames(self):
        from pyramid.mako_templating import renderer_factory

        info = DummyRendererInfo({
            'name':'app:moon-and-world.mak',
            'package':None,
            'registry':self.config.registry,
            'settings':{},
            'type': ''
        })

        result = renderer_factory(info)
        self.assertEqual(result.path, 'app:moon-and-world.mak')
示例#2
0
    def test_space_dot_name_def(self):
        from pyramid.mako_templating import renderer_factory

        info = DummyRendererInfo({
            'name':'hello .world#comp.mako',
            'package':None,
            'registry':self.config.registry,
            'settings':{},
            })

        result = renderer_factory(info)
        self.assertEqual(result.path, 'hello .world.mako')
        self.assertEqual(result.defname, 'comp')
示例#3
0
    def test_hyphen_filenames(self):
        from pyramid.mako_templating import renderer_factory

        info = DummyRendererInfo({
            'name': 'app:moon-and-world.mak',
            'package': None,
            'registry': self.config.registry,
            'settings': {},
            'type': ''
        })

        result = renderer_factory(info)
        self.assertEqual(result.path, 'app:moon-and-world.mak')
示例#4
0
    def test_space_dot_name_def(self):
        from pyramid.mako_templating import renderer_factory

        info = DummyRendererInfo({
            'name': 'hello .world#comp.mako',
            'package': None,
            'registry': self.config.registry,
            'settings': {},
        })

        result = renderer_factory(info)
        self.assertEqual(result.path, 'hello .world.mako')
        self.assertEqual(result.defname, 'comp')
 def _callFUT(self, info):
     from pyramid.mako_templating import renderer_factory
     return renderer_factory(info)
示例#6
0
文件: __init__.py 项目: 99co/pyjade
 def __init__(self, info):
     info.settings['mako.preprocessor'] = preprocessor
     self.makoRenderer = mako_templating.renderer_factory(info)
示例#7
0
 def __init__(self, info):
     info.settings['mako.preprocessor'] = preprocessor
     self.makoRenderer = mako_templating.renderer_factory(info)
示例#8
0
 def _callFUT(self, info):
     from pyramid.mako_templating import renderer_factory
     return renderer_factory(info)