Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 4,874 for Code (0.13 sec)

  1. tests/test_response_change_status_code.py

        response.status_code = 201
    
    
    async def parent_dep(result=Depends(response_status_setter)):
        return result
    
    
    @app.get("/", dependencies=[Depends(parent_dep)])
    async def get_main():
        return {"msg": "Hello World"}
    
    
    client = TestClient(app)
    
    
    def test_dependency_set_status_code():
        response = client.get("/")
        assert response.status_code == 201, response.text
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Wed Apr 08 04:37:38 GMT 2020
    - 589 bytes
    - Viewed (0)
  2. tests/test_security_oauth2_authorization_code_bearer.py

    
    def test_no_token():
        response = client.get("/items")
        assert response.status_code == 401, response.text
        assert response.json() == {"detail": "Not authenticated"}
    
    
    def test_incorrect_token():
        response = client.get("/items", headers={"Authorization": "Non-existent testtoken"})
        assert response.status_code == 401, response.text
        assert response.json() == {"detail": "Not authenticated"}
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2.3K bytes
    - Viewed (0)
  3. tests/test_reponse_set_reponse_code_empty.py

    
    @app.delete(
        "/{id}",
        status_code=204,
        response_model=None,
    )
    async def delete_deployment(
        id: int,
        response: Response,
    ) -> Any:
        response.status_code = 400
        return {"msg": "Status overwritten", "id": id}
    
    
    client = TestClient(app)
    
    
    def test_dependency_set_status_code():
        response = client.delete("/1")
        assert response.status_code == 400 and response.content
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 3.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
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2.4K bytes
    - Viewed (0)
  5. api/maven-api-core/src/main/java/org/apache/maven/api/Node.java

         */
        @Nullable
        Dependency getDependency();
    
        /**
         * Gets the child nodes of this node.
         *
         * @return the child nodes of this node, never {@code null}
         */
        @Nonnull
        List<Node> getChildren();
    
        /**
         * @return repositories of this node
         */
        @Nonnull
        List<RemoteRepository> getRemoteRepositories();
    
        /**
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Fri Dec 08 08:42:44 GMT 2023
    - 3.2K bytes
    - Viewed (0)
  6. misc/wasm/wasm_exec_node.js

    go.exit = process.exit;
    WebAssembly.instantiate(fs.readFileSync(process.argv[2]), go.importObject).then((result) => {
    	process.on("exit", (code) => { // Node.js exits if no event handler is pending
    		if (code === 0 && !go.exited) {
    			// deadlock, make Go print error and stack traces
    			go._pendingEvent = { id: 0 };
    			go._resume();
    		}
    	});
    	return go.run(result.instance);
    JavaScript
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Jan 30 18:49:42 GMT 2023
    - 1.1K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/graph/MutableValueGraph.java

      /**
       * Removes {@code node} if it is present; all edges incident to {@code node} will also be removed.
       *
       * @return {@code true} if the graph was modified as a result of this call
       */
      @CanIgnoreReturnValue
      boolean removeNode(N node);
    
      /**
       * Removes the edge connecting {@code nodeU} to {@code nodeV}, if it is present.
       *
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 26 17:43:39 GMT 2021
    - 4.4K bytes
    - Viewed (0)
  8. src/main/java/jcifs/SmbResource.java

         * the local SMB network. If this <code>SmbResource</code> refers to the root
         * <code>smb://</code> resource <code>true</code> is always returned. If
         * this <code>SmbResource</code> is a traditional file or directory, it will
         * be queried for on the specified server as expected.
         *
         * @return <code>true</code> if the resource exists or is alive or
         *         <code>false</code> otherwise
         * @throws CIFSException
    Java
    - Registered: Sun May 05 00:10:10 GMT 2024
    - Last Modified: Sun Dec 20 14:09:34 GMT 2020
    - 26K bytes
    - Viewed (0)
  9. maven-api-impl/src/main/java/org/apache/maven/internal/impl/AbstractSession.java

        }
    
        @Override
        public Node getNode(org.eclipse.aether.graph.DependencyNode node) {
            return getNode(node, false);
        }
    
        @Override
        public Node getNode(org.eclipse.aether.graph.DependencyNode node, boolean verbose) {
            return allNodes.computeIfAbsent(node, n -> new DefaultNode(this, n, verbose));
        }
    
        @Nonnull
        @Override
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Thu May 02 16:33:18 GMT 2024
    - 27.2K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/graph/ValueGraph.java

      @Override
      Set<EndpointPair<N>> incidentEdges(N node);
    
      /**
       * Returns the count of {@code node}'s incident edges, counting self-loops twice (equivalently,
       * the number of times an edge touches {@code node}).
       *
       * <p>For directed graphs, this is equal to {@code inDegree(node) + outDegree(node)}.
       *
       * <p>For undirected graphs, this is equal to {@code incidentEdges(node).size()} + (number of
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Jan 22 17:29:38 GMT 2024
    - 15K bytes
    - Viewed (0)
Back to top