'Test whether file objects are converted to filenames without altering other structures'

def test_convert_files_to_filenames(self):

    problem_file = os.path.join(os.path.dirname(__file__), 'test_files/filename_convert_test.txt')
    with open(problem_file) as fp:
        answers_with_file = {'1_2_1': 'String-based    answer', '1_3_1': ['answer1', 'answer2', 'answer3'], '1_4_1': [fp, fp]}
        answers_converted = convert_files_to_filenames(answers_with_file)
        self.assertEquals(answers_converted['1_2_1'], 'String-based    answer')
        self.assertEquals(answers_converted['1_3_1'], ['answer1', 'answer2', 'answer3'])
        self.assertEquals(answers_converted['1_4_1'], [fp.name, fp.name])
