

def test_wait_quit_while_waiting(self):
    self.mox.stubs.Set(time, 'time', (lambda : 0))
    inst = instance.Instance(self.request_data, 'name', self.proxy, max_concurrent_requests=0)
    self.mox.StubOutWithMock(inst._condition, 'wait')
    inst._condition.wait(1).WithSideEffects((lambda *unused_args: inst.quit()))
    self.mox.ReplayAll()
    unused_args.assertFalse(inst.wait(1))
    self.mox.VerifyAll()

dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/tools/devappserver2/instance_test.py TestInstance.test_wait_quit_while_waiting/VarMisuse@95/125 `self`->`unused_args`