

def test_restricted_path_function_allowed(self):
    fake_function = self.mox.CreateMockAnything()
    fake_function('foo', bar='baz').AndReturn(1)
    stubs.FakeFile.is_file_accessible('foo').AndReturn(True)
    self.mox.ReplayAll()
    restricted_path_fake_function = stubs.RestrictedPathFunction(fake_function)
    self.assertEqual(1, restricted_path_fake_function('foo', bar='baz'))
    restricted_path_fake_function.mox.VerifyAll()

dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/tools/devappserver2/python/stubs_test.py StubsTest.test_restricted_path_function_allowed/VarMisuse@81/131 `self`->`restricted_path_fake_function`