2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
10 from local_file_system
import LocalFileSystem
12 class LocalFileSystemTest(unittest
.TestCase
):
14 self
._file
_system
= LocalFileSystem(os
.path
.join(sys
.path
[0],
18 def testReadFiles(self
):
20 'test1.txt': 'test1\n',
21 'test2.txt': 'test2\n',
22 'test3.txt': 'test3\n',
26 self
._file
_system
.Read(['test1.txt', 'test2.txt', 'test3.txt']).Get())
28 def testListDir(self
):
31 expected
.append('file%d.html' % i
)
32 self
.assertEqual(expected
,
33 sorted(self
._file
_system
.ReadSingle('list/').Get()))
35 if __name__
== '__main__':