Beispiel #1
0
 def test_request_context(self):
     self.assertEqual(
         render_to_string(self.template_name,
                          context_instance=RequestContext(
                              None, {'obj': 'test'})), 'obj:test')
Beispiel #2
0
 def test_context_instance_kwarg(self):
     self.assertEqual(
         render_to_string(self.template_name,
                          context_instance=Context({'obj': 'test'})),
         'obj:test')
Beispiel #3
0
 def test_positional_arg(self):
     self.assertEqual(render_to_string(self.template_name, {'obj': 'test'}),
                      'obj:test')
Beispiel #4
0
 def test_dictionary_kwarg(self):
     self.assertEqual(
         render_to_string(self.template_name,
                          dictionary={'obj': 'test'}), 'obj:test')
Beispiel #5
0
 def test_basic(self):
     self.assertEqual(render_to_string(self.template_name), 'obj:')