1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
7 from tvcm import fake_fs
9 class FakeFSUnittest(unittest.TestCase):
12 fs.AddFile('/blah/x', 'foobar')
14 assert os.path.exists('/blah/x')
17 open('/blah/x', 'r').read())
20 def testWithableOpen(self):
22 fs.AddFile('/blah/x', 'foobar')
24 with open('/blah/x', 'r') as f:
25 self.assertEquals('foobar', f.read())