

def test_init_accessible(self):
    self.mox.StubOutWithMock(stubs.FakeFile, 'is_file_accessible')
    stubs.FakeFile.is_file_accessible(__file__).AndReturn(True)
    self.mox.ReplayAll()
    with stubs.FakeFile(__file__) as f:
        fake_file_content = f.read()
    self.mox.VerifyAll()
    with open(__file__) as f:
        real_file_content = f.read()
    self.assertEqual(real_file_content, fake_file_content)

dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/tools/devappserver2/python/stubs_test.py FakeFileTest.test_init_accessible/original