Search Options

Results per page
Sort
Preferred Languages
Advance

Results 151 - 160 of 3,434 for getT (0.05 sec)

  1. tests/test_dependency_contextmanager.py

        finally:
            state["context_b"] = f"finished b with a: {state['context_a']}"
    
    
    @app.get("/async")
    async def get_async(state: str = Depends(asyncgen_state)):
        return state
    
    
    @app.get("/sync")
    async def get_sync(state: str = Depends(generator_state)):
        return state
    
    
    @app.get("/async_raise")
    async def get_async_raise(state: str = Depends(asyncgen_state_try)):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Aug 17 04:13:50 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_bigger_applications/test_main_an_py39.py

    
    @needs_py39
    def test_users_token_jessica(client: TestClient):
        response = client.get("/users?token=jessica")
        assert response.status_code == 200
        assert response.json() == [{"username": "Rick"}, {"username": "Morty"}]
    
    
    @needs_py39
    def test_users_with_no_token(client: TestClient):
        response = client.get("/users")
        assert response.status_code == 422
        assert response.json() == IsDict(
            {
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 24.9K bytes
    - Viewed (0)
  3. tests/test_security_http_bearer_optional.py

    client = TestClient(app)
    
    
    def test_security_http_bearer():
        response = client.get("/users/me", headers={"Authorization": "Bearer foobar"})
        assert response.status_code == 200, response.text
        assert response.json() == {"scheme": "Bearer", "credentials": "foobar"}
    
    
    def test_security_http_bearer_no_credentials():
        response = client.get("/users/me")
        assert response.status_code == 200, response.text
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 2.1K bytes
    - Viewed (0)
  4. tests/test_security_oauth2_authorization_code_bearer_description.py

        tokenUrl="token",
        description="OAuth2 Code Bearer",
        auto_error=True,
    )
    
    
    @app.get("/items/")
    async def read_items(token: Optional[str] = Security(oauth2_scheme)):
        return {"token": token}
    
    
    client = TestClient(app)
    
    
    def test_no_token():
        response = client.get("/items")
        assert response.status_code == 401, response.text
        assert response.json() == {"detail": "Not authenticated"}
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 2.4K bytes
    - Viewed (0)
  5. tests/test_security_oauth2_password_bearer_optional.py

    oauth2_scheme = OAuth2PasswordBearer(tokenUrl="/token", auto_error=False)
    
    
    @app.get("/items/")
    async def read_items(token: Optional[str] = Security(oauth2_scheme)):
        if token is None:
            return {"msg": "Create an account first"}
        return {"token": token}
    
    
    client = TestClient(app)
    
    
    def test_no_token():
        response = client.get("/items")
        assert response.status_code == 200, response.text
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 2.1K bytes
    - Viewed (0)
  6. src/test/java/org/codelibs/fess/it/search/SearchApiTests.java

            for (Map<String, Object> elem : jobLogList) {
                deleteMethod("/api/admin/joblog/log/" + elem.get("id"));
            }
    
            final List<Map<String, Object>> crawlingInfoList = readCrawlingInfo(fileConfigId);
            for (Map<String, Object> elem : crawlingInfoList) {
                deleteMethod("/api/admin/crawlinginfo/log/" + elem.get("id"));
            }
    
    Registered: Thu Oct 31 13:40:30 UTC 2024
    - Last Modified: Thu Feb 22 01:37:57 UTC 2024
    - 18.6K bytes
    - Viewed (0)
  7. cmd/storage-rest-client.go

    }
    
    // Wrapper to restClient.CallWithMethod to handle network errors, in case of network error the connection is disconnected
    // and a healthcheck routine gets invoked that would reconnect.
    func (client *storageRESTClient) callGet(ctx context.Context, rpcMethod string, values url.Values, body io.Reader, length int64) (io.ReadCloser, error) {
    	if values == nil {
    		values = make(url.Values)
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sun Oct 13 13:07:21 UTC 2024
    - 30.2K bytes
    - Viewed (0)
  8. android/guava-testlib/src/com/google/common/collect/testing/testers/MapGetTester.java

      public void testGet_yes() {
        assertEquals("get(present) should return the associated value", v0(), get(k0()));
      }
    
      public void testGet_no() {
        assertNull("get(notPresent) should return null", get(k3()));
      }
    
      @MapFeature.Require(ALLOWS_NULL_KEY_QUERIES)
      public void testGet_nullNotContainedButAllowed() {
        assertNull("get(null) should return null", get(null));
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Jul 24 20:12:35 UTC 2024
    - 3K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/util/concurrent/AtomicsTest.java

      public void testNewReference() throws Exception {
        assertEquals(null, Atomics.newReference().get());
      }
    
      public void testNewReference_withInitialValue() throws Exception {
        assertEquals(null, Atomics.newReference(null).get());
        assertEquals(OBJECT, Atomics.newReference(OBJECT).get());
      }
    
      public void testNewReferenceArray_withLength() throws Exception {
        int length = 42;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 2.5K bytes
    - Viewed (0)
  10. tests/test_param_include_in_schema.py

    from fastapi import Cookie, FastAPI, Header, Path, Query
    from fastapi.testclient import TestClient
    
    app = FastAPI()
    
    
    @app.get("/hidden_cookie")
    async def hidden_cookie(
        hidden_cookie: Optional[str] = Cookie(default=None, include_in_schema=False),
    ):
        return {"hidden_cookie": hidden_cookie}
    
    
    @app.get("/hidden_header")
    async def hidden_header(
        hidden_header: Optional[str] = Header(default=None, include_in_schema=False),
    ):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Mar 26 16:56:53 UTC 2024
    - 7.4K bytes
    - Viewed (0)
Back to top