

def test_quit_with_request(self):
    inst = instance.Instance(self.request_data, 'name', self.proxy, max_concurrent_requests=5)
    self.mox.StubOutWithMock(inst._condition, 'notify_all')
    self.proxy.start()
    self.mox.ReplayAll()
    inst.start()
    self.mox.VerifyAll()
    inst._num_outstanding_requests = 1
    self.assertRaises(instance.CannotQuitServingInstance, inst.quit)

dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/tools/devappserver2/instance_test.py TestInstance.test_quit_with_request/original