'Test _check_mako_file_is_safe with disable pragma for safe-by-default
works to designate that this is not a Mako file'

def test_check_mako_expression_default_disabled(self):

    linter = MakoTemplateLinter()
    results = FileResults('')
    mako_template = textwrap.dedent('\n                                                #    This    is    anything    but    a    Mako    file.\n\n                                                #    pragma    can    appear    anywhere    in    file\n                                                #    xss-lint:    disable=mako-missing-default\n                                ')
    linter._check_mako_file_is_safe(mako_template, results)
    self.assertEqual(len(results.violations), 1)
    self.assertTrue(results.violations[0].is_disabled)
