Search Options

Results per page
Sort
Preferred Languages
Advance

Results 311 - 320 of 3,475 for getE (0.03 sec)

  1. tests/test_dependency_security_overrides.py

    def get_data_override():
        return [3, 4, 5]
    
    
    @app.get("/user")
    def read_user(
        user_data: Tuple[str, List[str]] = Security(get_user, scopes=["foo", "bar"]),
        data: List[int] = Depends(get_data),
    ):
        return {"user": user_data[0], "scopes": user_data[1], "data": data}
    
    
    client = TestClient(app)
    
    
    def test_normal():
        response = client.get("/user")
        assert response.json() == {
            "user": "john",
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Jun 14 15:54:46 UTC 2020
    - 1.4K bytes
    - Viewed (0)
  2. cmd/storage-rest-server.go

    	if !s.checkID(params.Get(storageRESTDiskID)) {
    		return nil, grid.NewRemoteErr(errDiskNotFound)
    	}
    	origvolume := params.Get(storageRESTOrigVolume)
    	volume := params.Get(storageRESTVolume)
    	filePath := params.Get(storageRESTFilePath)
    	versionID := params.Get(storageRESTVersionID)
    
    	healing, err := strconv.ParseBool(params.Get(storageRESTHealing))
    	if err != nil {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Aug 14 17:11:51 UTC 2024
    - 45.7K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/collect/SparseImmutableTable.java

          Cell<R, C, V> cell = cellList.get(i);
          R rowKey = cell.getRowKey();
          C columnKey = cell.getColumnKey();
          V value = cell.getValue();
    
          /*
           * These requireNonNull calls are safe because we construct the maps to hold all the provided
           * cells.
           */
          cellRowIndices[i] = requireNonNull(rowIndex.get(rowKey));
          Map<C, V> thisRow = requireNonNull(rows.get(rowKey));
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Nov 30 21:54:06 UTC 2023
    - 5.6K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_security/test_tutorial003_an_py310.py

    
    @needs_py310
    def test_no_token(client: TestClient):
        response = client.get("/users/me")
        assert response.status_code == 401, response.text
        assert response.json() == {"detail": "Not authenticated"}
        assert response.headers["WWW-Authenticate"] == "Bearer"
    
    
    @needs_py310
    def test_token(client: TestClient):
        response = client.get("/users/me", headers={"Authorization": "Bearer johndoe"})
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 8.4K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_security/test_tutorial003_py310.py

    
    @needs_py310
    def test_no_token(client: TestClient):
        response = client.get("/users/me")
        assert response.status_code == 401, response.text
        assert response.json() == {"detail": "Not authenticated"}
        assert response.headers["WWW-Authenticate"] == "Bearer"
    
    
    @needs_py310
    def test_token(client: TestClient):
        response = client.get("/users/me", headers={"Authorization": "Bearer johndoe"})
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 8.4K bytes
    - Viewed (0)
  6. guava-testlib/src/com/google/common/util/concurrent/testing/AbstractListenableFutureTest.java

      /** Tests that the {@link Future#get()} method blocks until a value is available. */
      public void testGetBlocksUntilValueAvailable() throws Throwable {
    
        assertFalse(future.isDone());
        assertFalse(future.isCancelled());
    
        ExecutorService executor = Executors.newSingleThreadExecutor();
    
        try {
          Future<Boolean> getResult = executor.submit(() -> future.get());
    
          // Release the future value.
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Sep 06 18:30:30 UTC 2023
    - 6K bytes
    - Viewed (0)
  7. internal/config/scanner/scanner.go

    	delay := env.Get(EnvDelayLegacy, "")
    	if delay == "" {
    		delay = env.Get(EnvDelay, kvs.GetWithDefault(Delay, DefaultKVS))
    	}
    	cfg.Delay, err = strconv.ParseFloat(delay, 64)
    	if err != nil {
    		return err
    	}
    	maxWait := env.Get(EnvMaxWaitLegacy, "")
    	if maxWait == "" {
    		maxWait = env.Get(EnvMaxWait, kvs.GetWithDefault(MaxWait, DefaultKVS))
    	}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  8. tests/test_enforce_once_required_parameter.py

    def test_schema():
        response = client.get("/openapi.json")
        assert response.status_code == status.HTTP_200_OK
        actual_schema = response.json()
        assert actual_schema == expected_schema
    
    
    def test_get_invalid():
        response = client.get("/foo")
        assert response.status_code == status.HTTP_422_UNPROCESSABLE_ENTITY
    
    
    def test_get_valid():
        response = client.get("/foo", params={"client_id": "bar"})
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 3.4K bytes
    - Viewed (0)
  9. tests/test_inherited_custom_class.py

                return str(v)
    
        @app.get("/get_custom_class")
        def return_some_user():
            # Test that the fix also works for custom pydantic classes
            return SomeCustomClass(a_uuid=MyUuid("b8799909-f914-42de-91bc-95c819218d01"))
    
        client = TestClient(app)
    
        with client:
            response_simple = client.get("/fast_uuid")
            response_pydantic = client.get("/get_custom_class")
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Aug 17 04:13:50 UTC 2024
    - 3K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_query_params_str_validations/test_tutorial010_an.py

    
    def test_query_params_str_validations_no_query(client: TestClient):
        response = client.get("/items/")
        assert response.status_code == 200
        assert response.json() == {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]}
    
    
    def test_query_params_str_validations_item_query_fixedquery(client: TestClient):
        response = client.get("/items/", params={"item-query": "fixedquery"})
        assert response.status_code == 200
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 6.2K bytes
    - Viewed (0)
Back to top