          with self.assertRaises(TemplateSyntaxError):
              render("{% load flatpages %}{% get_flatpages as flatpages asdf %}")
          with self.assertRaises(TemplateSyntaxError):
              render("{% load flatpages %}{% get_flatpages cheesecake user as flatpages %}")
          with self.assertRaises(TemplateSyntaxError):
              render("{% load flatpages %}{% get_flatpages for user as flatpages asdf %}")
          with self.assertRaises(TemplateSyntaxError):
              render("{% load flatpages %}{% get_flatpages prefix for user as flatpages asdf %}")
 
</s> remove         with self.assertRaises(TemplateSyntaxError):
 </s> add         with self.assertRaisesMessage(TemplateSyntaxError, msg): </s> remove         with self.assertRaises(TemplateSyntaxError):
 </s> add         with self.assertRaisesMessage(TemplateSyntaxError, msg): </s> remove         with self.assertRaises(TemplateSyntaxError):
 </s> add         with self.assertRaisesMessage(TemplateSyntaxError, msg): </s> remove         with self.assertRaises(TemplateSyntaxError):
 </s> add         with self.assertRaisesMessage(TemplateSyntaxError, msg): </s> remove         with self.assertRaises(TemplateSyntaxError):
 </s> add         with self.assertRaisesMessage(TemplateSyntaxError, msg):
        with self.assertRaisesMessage(TemplateSyntaxError, msg):
          with self.assertRaises(TemplateSyntaxError):
              render("{% load flatpages %}{% get_flatpages as flatpages asdf %}")
          with self.assertRaises(TemplateSyntaxError):
              render("{% load flatpages %}{% get_flatpages cheesecake user as flatpages %}")
        with self.assertRaisesMessage(TemplateSyntaxError, msg):
              render("{% load flatpages %}{% get_flatpages for user as flatpages asdf %}")
          with self.assertRaises(TemplateSyntaxError):
              render("{% load flatpages %}{% get_flatpages prefix for user as flatpages asdf %}")
keep keep keep keep replace keep keep keep
 Used assertRaisesMessage() to test Django's error messages. 
tests/flatpages_tests/test_templatetags.py