'Test check_underscore_file_is_safe with disabled before a line only
disables for the violation following'

def test_check_underscore_file_disables_one_violation(self):

    linter = UnderscoreTemplateLinter()
    results = FileResults('')
    template = textwrap.dedent('\n                                                <%    //    xss-lint:    disable=underscore-not-escaped    %>\n                                                <%=    message    %>\n                                                <%=    message    %>\n                                ')
    linter.check_underscore_file_is_safe(template, results)
    self.assertEqual(len(results.violations), 2)
    self.assertEqual(results.violations[0].is_disabled, True)
    self.assertEqual(results.violations[1].is_disabled, False)
