Exemplo n.º 1
0
 def test_include_to_global(self):
     """ Templates: Updated globals() with include() result"""
     with chdir(__file__):
         t = SimpleTemplate(name='stpl_include_to_global', lookup=['./views/'])
         self.assertRenders(t, 'before\nstart var end\nstart 3 then var end\nafter\n', var='var')
Exemplo n.º 2
0
 def test_include(self):
     """ Templates: Include statements"""
     with chdir(__file__):
         t = SimpleTemplate(name='stpl_include', lookup=['./views/'])
         self.assertRenders(t, 'before\nstart var end\nafter\n', var='var')