          "There are various ways that the flatpages template tag won't parse"
          def render(t):
              return Template(t).render(Context())
  
          self.assertRaises(TemplateSyntaxError, render,
                            "{% load flatpages %}{% get_flatpages %}")
          self.assertRaises(TemplateSyntaxError, render,
                            "{% load flatpages %}{% get_flatpages as %}")
          self.assertRaises(TemplateSyntaxError, render,
                            "{% load flatpages %}{% get_flatpages cheesecake flatpages %}")
          self.assertRaises(TemplateSyntaxError, render,
                            "{% load flatpages %}{% get_flatpages as flatpages asdf %}")
          self.assertRaises(TemplateSyntaxError, render,
                            "{% load flatpages %}{% get_flatpages cheesecake user as flatpages %}")
          self.assertRaises(TemplateSyntaxError, render,
                            "{% load flatpages %}{% get_flatpages for user as flatpages asdf %}")
          self.assertRaises(TemplateSyntaxError, render,
                            "{% load flatpages %}{% get_flatpages prefix for user as flatpages asdf %}")
 
</s> remove         self.assertRaises(TemplateSyntaxError, FilterExpression, "article._hidden|upper", p)
 </s> add         with self.assertRaises(TemplateSyntaxError):
            FilterExpression("article._hidden|upper", p) </s> remove         self.assertRaises(TemplateSyntaxError, Variable, "article._hidden")
 </s> add         with self.assertRaises(TemplateSyntaxError):
            Variable("article._hidden") </s> remove             self.assertRaises(
                AttributeError,
                self.client.post,
                '/quota/broken/',
                {'f': file}
            )
 </s> add             with self.assertRaises(AttributeError):
                self.client.post('/quota/broken/', {'f': file}) </s> remove         self.assertRaises(ImproperlyConfigured, self.backend)
 </s> add         with self.assertRaises(ImproperlyConfigured):
            self.backend() </s> remove         self.assertRaises(AttributeError, lambda: CommonInfo.objects.all())
 </s> add         with self.assertRaises(AttributeError):
            CommonInfo.objects.all()
        with self.assertRaises(TemplateSyntaxError):
            render("{% load flatpages %}{% get_flatpages %}")
        with self.assertRaises(TemplateSyntaxError):
            render("{% load flatpages %}{% get_flatpages as %}")
        with self.assertRaises(TemplateSyntaxError):
            render("{% load flatpages %}{% get_flatpages cheesecake flatpages %}")
        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 %}")
          "There are various ways that the flatpages template tag won't parse"
          def render(t):
              return Template(t).render(Context())
  
        with self.assertRaises(TemplateSyntaxError):
            render("{% load flatpages %}{% get_flatpages %}")
        with self.assertRaises(TemplateSyntaxError):
            render("{% load flatpages %}{% get_flatpages as %}")
        with self.assertRaises(TemplateSyntaxError):
            render("{% load flatpages %}{% get_flatpages cheesecake flatpages %}")
        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 %}")
        with self.assertRaises(TemplateSyntaxError):
            render("{% load flatpages %}{% get_flatpages %}")
        with self.assertRaises(TemplateSyntaxError):
            render("{% load flatpages %}{% get_flatpages as %}")
        with self.assertRaises(TemplateSyntaxError):
            render("{% load flatpages %}{% get_flatpages cheesecake flatpages %}")
        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 %}")
        with self.assertRaises(TemplateSyntaxError):
            render("{% load flatpages %}{% get_flatpages %}")
        with self.assertRaises(TemplateSyntaxError):
            render("{% load flatpages %}{% get_flatpages as %}")
        with self.assertRaises(TemplateSyntaxError):
            render("{% load flatpages %}{% get_flatpages cheesecake flatpages %}")
        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 %}")
        with self.assertRaises(TemplateSyntaxError):
            render("{% load flatpages %}{% get_flatpages %}")
        with self.assertRaises(TemplateSyntaxError):
            render("{% load flatpages %}{% get_flatpages as %}")
        with self.assertRaises(TemplateSyntaxError):
            render("{% load flatpages %}{% get_flatpages cheesecake flatpages %}")
        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 %}")
        with self.assertRaises(TemplateSyntaxError):
            render("{% load flatpages %}{% get_flatpages %}")
        with self.assertRaises(TemplateSyntaxError):
            render("{% load flatpages %}{% get_flatpages as %}")
        with self.assertRaises(TemplateSyntaxError):
            render("{% load flatpages %}{% get_flatpages cheesecake flatpages %}")
        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 %}")
        with self.assertRaises(TemplateSyntaxError):
            render("{% load flatpages %}{% get_flatpages %}")
        with self.assertRaises(TemplateSyntaxError):
            render("{% load flatpages %}{% get_flatpages as %}")
        with self.assertRaises(TemplateSyntaxError):
            render("{% load flatpages %}{% get_flatpages cheesecake flatpages %}")
        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 %}")
        with self.assertRaises(TemplateSyntaxError):
            render("{% load flatpages %}{% get_flatpages %}")
        with self.assertRaises(TemplateSyntaxError):
            render("{% load flatpages %}{% get_flatpages as %}")
        with self.assertRaises(TemplateSyntaxError):
            render("{% load flatpages %}{% get_flatpages cheesecake flatpages %}")
        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 %}")
        with self.assertRaises(TemplateSyntaxError):
            render("{% load flatpages %}{% get_flatpages %}")
        with self.assertRaises(TemplateSyntaxError):
            render("{% load flatpages %}{% get_flatpages as %}")
        with self.assertRaises(TemplateSyntaxError):
            render("{% load flatpages %}{% get_flatpages cheesecake flatpages %}")
        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 %}")
        with self.assertRaises(TemplateSyntaxError):
            render("{% load flatpages %}{% get_flatpages %}")
        with self.assertRaises(TemplateSyntaxError):
            render("{% load flatpages %}{% get_flatpages as %}")
        with self.assertRaises(TemplateSyntaxError):
            render("{% load flatpages %}{% get_flatpages cheesecake flatpages %}")
        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 %}")
        with self.assertRaises(TemplateSyntaxError):
            render("{% load flatpages %}{% get_flatpages %}")
        with self.assertRaises(TemplateSyntaxError):
            render("{% load flatpages %}{% get_flatpages as %}")
        with self.assertRaises(TemplateSyntaxError):
            render("{% load flatpages %}{% get_flatpages cheesecake flatpages %}")
        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 %}")
        with self.assertRaises(TemplateSyntaxError):
            render("{% load flatpages %}{% get_flatpages %}")
        with self.assertRaises(TemplateSyntaxError):
            render("{% load flatpages %}{% get_flatpages as %}")
        with self.assertRaises(TemplateSyntaxError):
            render("{% load flatpages %}{% get_flatpages cheesecake flatpages %}")
        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 %}")
        with self.assertRaises(TemplateSyntaxError):
            render("{% load flatpages %}{% get_flatpages %}")
        with self.assertRaises(TemplateSyntaxError):
            render("{% load flatpages %}{% get_flatpages as %}")
        with self.assertRaises(TemplateSyntaxError):
            render("{% load flatpages %}{% get_flatpages cheesecake flatpages %}")
        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 %}")
        with self.assertRaises(TemplateSyntaxError):
            render("{% load flatpages %}{% get_flatpages %}")
        with self.assertRaises(TemplateSyntaxError):
            render("{% load flatpages %}{% get_flatpages as %}")
        with self.assertRaises(TemplateSyntaxError):
            render("{% load flatpages %}{% get_flatpages cheesecake flatpages %}")
        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 %}")
        with self.assertRaises(TemplateSyntaxError):
            render("{% load flatpages %}{% get_flatpages %}")
        with self.assertRaises(TemplateSyntaxError):
            render("{% load flatpages %}{% get_flatpages as %}")
        with self.assertRaises(TemplateSyntaxError):
            render("{% load flatpages %}{% get_flatpages cheesecake flatpages %}")
        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 %}")
keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace replace replace replace
 Refs #26022 -- Used context manager version of assertRaises in tests. 
tests/flatpages_tests/test_templatetags.py