

def test_wait_waiting_for_can_accept(self):
    inst = instance.Instance(self.request_data, 'name', self.proxy, max_concurrent_requests=1, expect_ready_request=True)
    inst._started = True
    self.mox.StubOutWithMock(inst._condition, 'wait')
    self.time = 0
    self.mox.stubs.Set(time, 'time', (lambda : self.time))

    def advance_time(*unused_args):
        self.time += 10
    inst._condition.wait(1).WithSideEffects(advance_time)
    inst.mox.ReplayAll()
    self.assertFalse(inst.wait(1))
    self.mox.VerifyAll()

dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/tools/devappserver2/instance_test.py TestInstance.test_wait_waiting_for_can_accept/VarMisuse@112/146 `self`->`inst`