- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 113 for 500 (0.24 sec)
-
okhttp/src/main/kotlin/okhttp3/internal/concurrent/TaskLogger.kt
fun formatDuration(ns: Long): String { val s = when { ns <= -999_500_000 -> "${(ns - 500_000_000) / 1_000_000_000} s " ns <= -999_500 -> "${(ns - 500_000) / 1_000_000} ms" ns <= 0 -> "${(ns - 500) / 1_000} µs" ns < 999_500 -> "${(ns + 500) / 1_000} µs" ns < 999_500_000 -> "${(ns + 500_000) / 1_000_000} ms" else -> "${(ns + 500_000_000) / 1_000_000_000} s " } return String.format("%6s", s)
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 2.6K bytes - Viewed (0) -
tests/test_additional_responses_response_class.py
class JsonApiError(BaseModel): errors: typing.List[Error] @app.get( "/a", response_class=JsonApiResponse, responses={500: {"description": "Error", "model": JsonApiError}}, ) async def a(): pass # pragma: no cover @app.get("/b", responses={500: {"description": "Error", "model": Error}}) async def b(): pass # pragma: no cover client = TestClient(app)
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 3.5K bytes - Viewed (0) -
tests/test_response_model_sub_types.py
name: str app = FastAPI() @app.get("/valid1", responses={"500": {"model": int}}) def valid1(): pass @app.get("/valid2", responses={"500": {"model": List[int]}}) def valid2(): pass @app.get("/valid3", responses={"500": {"model": Model}}) def valid3(): pass @app.get("/valid4", responses={"500": {"model": List[Model]}}) def valid4(): pass
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 5.3K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/concurrent/TaskLoggerTest.kt
assertThat(formatDuration(-2_500_000_000L)).isEqualTo(" -3 s ") assertThat(formatDuration(-2_499_999_999L)).isEqualTo(" -2 s ") assertThat(formatDuration(-1_500_000_000L)).isEqualTo(" -2 s ") assertThat(formatDuration(-1_499_999_999L)).isEqualTo(" -1 s ") assertThat(formatDuration(-1_000_000_000L)).isEqualTo(" -1 s ") assertThat(formatDuration( -999_500_000L)).isEqualTo(" -1 s ")
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 3.6K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/http/ThreadInterruptTest.kt
.throttleBody((64 * 1024).toLong(), 125, TimeUnit.MILLISECONDS), ) // 500 Kbps server.start() val call = client.newCall( Request.Builder() .url(server.url("/")) .build(), ) val response = call.execute() interruptLater(500) val responseBody = response.body.byteStream() val buffer = ByteArray(1024)
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 4.6K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/WholeOperationTimeoutTest.kt
} @Test fun timeoutWritingRequest() { server.enqueue(MockResponse()) val request = Request.Builder() .url(server.url("/")) .post(sleepingRequestBody(500)) .build() val call = client.newCall(request) call.timeout().timeout(250, TimeUnit.MILLISECONDS) assertFailsWith<IOException> { call.execute() }.also { expected ->
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 10.5K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/http/CancelTest.kt
Buffer() .write(ByteArray(responseBodySize)), ) .throttleBody(64 * 1024, 125, MILLISECONDS) // 500 Kbps .build(), ) val call = client.newCall(Request(server.url("/"))) val response = call.execute() cancelLater(call, 500) val responseBody = response.body.byteStream() val buffer = ByteArray(1024) assertFailsWith<IOException> {
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Sat Jan 20 10:30:28 GMT 2024 - 9.9K bytes - Viewed (0) -
tests/test_response_class_no_mediatype.py
class JsonApiError(BaseModel): errors: typing.List[Error] @app.get( "/a", response_class=Response, responses={500: {"description": "Error", "model": JsonApiError}}, ) async def a(): pass # pragma: no cover @app.get("/b", responses={500: {"description": "Error", "model": Error}}) async def b(): pass # pragma: no cover client = TestClient(app)
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 3.3K bytes - Viewed (0) -
tests/test_response_code_no_body.py
status: str title: str class JsonApiError(BaseModel): errors: typing.List[Error] @app.get( "/a", status_code=204, response_class=JsonApiResponse, responses={500: {"description": "Error", "model": JsonApiError}}, ) async def a(): pass @app.get("/b", responses={204: {"description": "No Content"}}) async def b(): pass # pragma: no cover
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 3.2K bytes - Viewed (0) -
tests/test_include_router_defaults_overrides.py
async def callback5(level5: str): pass # pragma: nocover app = FastAPI( dependencies=[Depends(dep0)], responses={ 400: {"description": "Client error level 0"}, 500: {"description": "Server error level 0"}, }, default_response_class=ResponseLevel0, callbacks=callback_router0.routes, ) router2_override = APIRouter( prefix="/level2",
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 358.6K bytes - Viewed (0)