def test_result_stream(self): test = Test(self.client) result_stream = test.result_stream() self.assertTrue(isinstance(result_stream, _TestResultStream)) self.assertEqual(result_stream.test, test) self.assertEqual(result_stream.result_ids, [ TestResult.result_id_from_name(TestResult.USER_LOAD_TIME, load_zone_id=LoadZone.name_to_id( LoadZone.AGGREGATE_WORLD)), TestResult.result_id_from_name(TestResult.ACTIVE_USERS, load_zone_id=LoadZone.name_to_id( LoadZone.AGGREGATE_WORLD)) ])
def _check_is_done(self, status, expected): test = Test(self.client) test.status = status self.assertEqual(test.is_done(), expected) self.assertEqual(self.client.last_request_method, 'get')
def test_abort_failed_409(self): client = MockClient(response_status_code=409) test = Test(client) result = test.abort() self.assertEqual(client.last_request_method, 'post') self.assertFalse(result)
def test_is_done(self): test = Test(self.client) self.assertFalse(test.is_done()) self.assertEqual(self.client.last_request_method, 'get')
def test_abort(self): test = Test(self.client) result = test.abort() self.assertEqual(self.client.last_request_method, 'post') self.assertTrue(result)