'Test _find_mako_expressions for parseable expressions'

@data({'template': '${x}'}, {'template': '\n    ${x}'}, {'template': '${x}    '}, {'template': '${{test-balanced-delims}}    '}, {'template': "${'{unbalanced    in    string'}"}, {'template': "${'unbalanced    in    string}'}"}, {'template': "${(\n                'tabbed-multi-line-expression'\n        )}"})
def test_find_mako_expressions(self, data):

    linter = MakoTemplateLinter()
    expressions = linter._find_mako_expressions(data['template'])
    self.assertEqual(len(expressions), 1)
    start_index = expressions[0].start_index
    end_index = expressions[0].end_index
    self.assertEqual(data['template'][start_index:end_index], data['template'].strip())
    self.assertEqual(expressions[0].expression, data['template'].strip())
