@staticmethod<EOL><INDENT>def get_expected(filename="<STR_LIT>", variable_dict=None):<DEDENT>
expected_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)), "<STR_LIT>")<EOL>expected_path = os.path.join(expected_dir, filename)<EOL>with open(expected_path) as content:<EOL><INDENT>expected = ustr(content.read())<EOL><DEDENT>if variable_dict:<EOL><INDENT>expected = expected.format(**variable_dict)<EOL><DEDENT>return expected<EOL>
Utility method to read an expected file from gitlint/tests/expected and return it as a string.
        Optionally replace template variables specified by variable_dict.