'Test check_python_file_is_safe with concatenating strings and HTML'

@data({'template': 'm    =    "Plain    text    "    +    message    +    "plain    text"', 'rule': None}, {'template': 'm    =    "\xe6\xaa\x8c\xe6\xaa\x92\xe6\xbf\xa6    "    +    message    +    "plain    text"', 'rule': None}, {'template': '        #    m    =    "<p>"    +    commentedOutMessage    +    "</p>"', 'rule': None}, {'template': 'm    =    "<p>"    +    message    +    "</p>"', 'rule': [Rules.python_concat_html, Rules.python_concat_html]}, {'template': 'm    =    "    <p>    "    +    message    +    "    </p>    "', 'rule': [Rules.python_concat_html, Rules.python_concat_html]}, {'template': 'm    =    "    <p>    "    +    message    +    "    broken    string', 'rule': Rules.python_parse_error})
def test_concat_with_html(self, data):

    linter = PythonLinter()
    results = FileResults('')
    linter.check_python_file_is_safe(data['template'], results)
    self._validate_data_rules(data, results)
