示例#1
0
    def handle(self, *args, **options):
        log_level = verbosity_map[int(options['verbosity'])]
        logging.basicConfig(format="%(levelname)s: %(message)s",
                            level=log_level)

        checker = TemplateChecker()

        for rel_path, abs_path in gen_all_templates():
            try:
                checker.check_template(rel_path)
            except (SystemExit, KeyboardInterrupt):
                raise
            except Exception, e:
                logging.error("%s exception while checking template %s: %s",
                                e.__class__.__name__, abs_path, e)
示例#2
0
 def test_app_directories_loader(self):
     templates = [tupl[0] for tupl in gen_all_templates()]
     self.assertTrue('base1.html' in templates)
     self.assertTrue('extends1.html' in templates)