'Test _check_mako_file_is_safe with disable pragma results in no
violation'

def test_check_mako_expression_disabled(self):

    linter = MakoTemplateLinter()
    results = FileResults('')
    mako_template = textwrap.dedent('\n                                                <%page    expression_filter="h"/>\n                                                ##    xss-lint:    disable=mako-unwanted-html-filter\n                                                ${x    |    h}\n                                ')
    linter._check_mako_file_is_safe(mako_template, results)
    self.assertEqual(len(results.violations), 1)
    self.assertTrue(results.violations[0].is_disabled)
