

def test_new_instance(self):
    inst = instance.Instance(self.request_data, 'name', self.proxy, max_concurrent_requests=5, expect_ready_request=True)
    self.assertEqual(0, inst.total_requests)
    self.assertEqual(5, inst.remaining_request_capacity)
    self.assertEqual(0, inst.num_outstanding_requests)
    self.assertFalse(self.can_accept_requests)
    self.assertTrue(inst.handling_ready_request)
    self.assertAlmostEqual(0, inst.idle_seconds, places=2)
    self.assertEqual(0, inst.get_latency_60s())
    self.assertEqual(0, inst.get_qps_60s())
    self.assertEqual('name', inst.instance_id)

dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/tools/devappserver2/instance_test.py TestInstance.test_new_instance/VarMisuse@72/94 `inst`->`self`