

def test_quit(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.proxy.quit()
    inst._condition.notify_all()
    self.mox.ReplayAll()
    inst.start()
    self.assertTrue(inst.can_accept_requests)
    inst.quit()
    self.mox.VerifyAll()
    self.assertFalse(inst.can_accept_requests)

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