@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>expected = open(expected_path).read()<EOL>if sys.version_info[<NUM_LIT:0>] == <NUM_LIT:2>:  <EOL><INDENT>expected = unicode(expected, DEFAULT_ENCODING)  <EOL><DEDENT>if variable_dict:<EOL><INDENT>expected = expected.format(**variable_dict)<EOL><DEDENT>return expected<EOL>
Utility method to read an 'expected' file and return it as a string. Optionally replace template variables
        specified by variable_dict.