Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 1,173 for Inception (0.24 sec)

  1. fastapi/exception_handlers.py

        )
    
    
    async def request_validation_exception_handler(
        request: Request, exc: RequestValidationError
    ) -> JSONResponse:
        return JSONResponse(
            status_code=HTTP_422_UNPROCESSABLE_ENTITY,
            content={"detail": jsonable_encoder(exc.errors())},
        )
    
    
    async def websocket_request_validation_exception_handler(
        websocket: WebSocket, exc: WebSocketRequestValidationError
    ) -> None:
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sun Jun 11 19:08:14 GMT 2023
    - 1.3K bytes
    - Viewed (0)
  2. tests/test_exception_handlers.py

    from starlette.responses import JSONResponse
    
    
    def http_exception_handler(request, exception):
        return JSONResponse({"exception": "http-exception"})
    
    
    def request_validation_exception_handler(request, exception):
        return JSONResponse({"exception": "request-validation"})
    
    
    def server_error_exception_handler(request, exception):
        return JSONResponse(status_code=500, content={"exception": "server-error"})
    
    
    app = FastAPI(
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Feb 17 12:40:12 GMT 2022
    - 1.9K bytes
    - Viewed (0)
  3. tests/test_starlette_exception.py

            )
        return {"item": items[item_id]}
    
    
    @app.get("/http-no-body-statuscode-exception")
    async def no_body_status_code_exception():
        raise HTTPException(status_code=204)
    
    
    @app.get("/http-no-body-statuscode-with-detail-exception")
    async def no_body_status_code_with_detail_exception():
        raise HTTPException(status_code=204, detail="I should just disappear!")
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 7.4K bytes
    - Viewed (0)
  4. tests/test_custom_middleware_exception.py

        return {"message": "OK"}
    
    
    app.include_router(router)
    app.add_middleware(ContentSizeLimitMiddleware, max_content_size=2**8)
    
    
    client = TestClient(app)
    
    
    def test_custom_middleware_exception(tmp_path: Path):
        default_pydantic_max_size = 2**16
        path = tmp_path / "test.txt"
        path.write_bytes(b"x" * (default_pydantic_max_size + 1))
    
        with client:
            with open(path, "rb") as file:
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Aug 25 21:44:40 GMT 2022
    - 2.8K bytes
    - Viewed (0)
  5. src/test/java/org/codelibs/core/convert/DateConversionUtilTest.java

            assertThat(toSqlDateJdbcEscape(null), is(nullValue()));
        }
    
        /**
         * @throws Exception
         */
        @Test
        public void testToSqlDate_EmptyString() throws Exception {
            assertThat(toSqlDateJdbcEscape(""), is(nullValue()));
        }
    
        /**
         * @throws Exception
         */
        @Test
        public void testToSqlDate_ShortStyle() throws Exception {
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 9.4K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/util/concurrent/FakeTimeLimiterTest.java

        Exception exception = new SampleCheckedException();
        ExecutionException e =
            assertThrows(
                ExecutionException.class,
                () ->
                    timeLimiter.callWithTimeout(
                        callableThrowing(exception), DELAY_MS, TimeUnit.MILLISECONDS));
        assertThat(e.getCause()).isEqualTo(exception);
      }
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 4.2K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/util/concurrent/FakeTimeLimiterTest.java

        Exception exception = new SampleCheckedException();
        ExecutionException e =
            assertThrows(
                ExecutionException.class,
                () ->
                    timeLimiter.callWithTimeout(
                        callableThrowing(exception), DELAY_MS, TimeUnit.MILLISECONDS));
        assertThat(e.getCause()).isEqualTo(exception);
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 4.2K bytes
    - Viewed (0)
  8. src/test/java/org/codelibs/core/collection/SLinkedListTest.java

        }
    
        /**
         * @throws Exception
         */
        @Test
        public void testGetLastEntry() throws Exception {
            assertThat(list.getLastEntry(), is(nullValue()));
            list.addLast("1");
            assertThat(list.getLastEntry().getElement(), is("1"));
        }
    
        /**
         * @throws Exception
         */
        @Test
        public void testGetLast() throws Exception {
            try {
                list.getLast();
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 8.3K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/util/concurrent/AbstractIdleServiceTest.java

        assertThat(e).hasCauseThat().isSameInstanceAs(exception);
        assertEquals(Service.State.FAILED, service.state());
      }
    
      public void testFunctionalStop_failed() {
        final Exception exception = new Exception("deliberate");
        AbstractIdleService service =
            new DefaultService() {
              @Override
              protected void shutDown() throws Exception {
                throw exception;
              }
            };
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 7.5K bytes
    - Viewed (0)
  10. src/test/java/org/codelibs/core/convert/NumberConversionUtilTest.java

    public class NumberConversionUtilTest extends TestCase {
    
        /**
         * @throws Exception
         */
        public void testConvertNumber_byte() throws Exception {
            assertEquals(new Byte("1"), NumberConversionUtil.convertNumber(Byte.class, "1"));
        }
    
        /**
         * @throws Exception
         */
        public void testConvertNumber_primitiveWrapper() throws Exception {
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 3.1K bytes
    - Viewed (0)
Back to top