예제 #1
0
 def test_extra_context_isolation(self):
     with ChangeModel(self.test_page, template='extra_context.html'):
         response = self.client.get(self.test_page.get_absolute_url())
         self.assertTrue('width' not in response.context)
예제 #2
0
 def test_extra_context_isolation(self):
     with ChangeModel(self.test_page, template='extra_context.html'):
         response = self.client.get(self.test_page.get_absolute_url())
         # only test the swallower context, other items in response.context are throwaway
         # contexts used for rendering templates fragments and templatetags
         self.assertFalse('extra_width' in response.context[0])