def testRead(self):
    file_object = fake_file_io.FakeFile(
        self._resolver_context, self._FILE_DATA1)
    file_object.open(path_spec=self._path_spec1)

    read_buffer = file_object.read()

    expected_buffer = (
        b'place,user,password\n'
        b'bank,joesmith,superrich\n'
        b'alarm system,-,1234\n'
        b'treasure chest,-,1111\n'
        b'uber secret laire,admin,admin\n')

    self.assertEqual(read_buffer, expected_buffer)

    file_object.close()

    # TODO: add boundary scenarios.
Test the read functionality.
dataset/ETHPy150Open log2timeline/dfvfs/tests/file_io/fake_file_io.py/FakeFileTest.testRead