Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 85 for Trick (0.15 sec)

  1. android/guava/src/com/google/common/base/Preconditions.java

       *
       * But the methods in this class want to throw different exceptions, depending on the args, so it
       * appears that this pattern is not directly applicable. But we can use the ridiculous, devious
       * trick of throwing an exception in the middle of the construction of another exception. Hotspot
       * is fine with that.
       */
    
      /**
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Apr 11 11:52:14 GMT 2024
    - 52.9K bytes
    - Viewed (0)
  2. cmd/bucket-handlers.go

    		r.Header.Set("prefix", "")
    
    		// Set delimiter value for "s3:delimiter" policy conditionals.
    		r.Header.Set("delimiter", SlashSeparator)
    
    		n := 0
    		// Use the following trick to filter in place
    		// https://github.com/golang/go/wiki/SliceTricks#filter-in-place
    		for _, bucketInfo := range bucketsInfo {
    			if globalIAMSys.IsAllowed(policy.Args{
    				AccountName:     cred.AccessKey,
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 25 16:27:27 GMT 2024
    - 61.6K bytes
    - Viewed (0)
  3. maven-core/src/test/java/org/apache/maven/project/PomConstructionTest.java

        // to validate the properties. We also need a way to navigate from the Tex specification documents to
        // the test in question and vice versa. A little Eclipse plugin would do the trick.
        public void testThatExecutionsWithoutIdsAreMergedAndTheChildWins() throws Exception {
            PomTestWrapper tester = buildPom("micromailer");
    Java
    - Registered: Sun Apr 28 03:35:10 GMT 2024
    - Last Modified: Fri Apr 12 10:50:18 GMT 2024
    - 93.2K bytes
    - Viewed (0)
  4. fastapi/applications.py

                    the OpenAPI version. But some tools, even though they might be
                    compatible with OpenAPI 3.1.0, might not recognize it as a valid.
    
                    So you could override this value to trick those tools into using
                    the generated OpenAPI. Have in mind that this is a hack. But if you
                    avoid using features added in OpenAPI 3.1.0, it might work for your
                    use case.
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 172.2K bytes
    - Viewed (0)
  5. tests/test_dependency_normal_exceptions.py

        assert state["finally"] is False
        response = client.put("/invalid-user/rick", json="Morty")
        assert response.status_code == 400, response.text
        assert response.json() == {"detail": "Invalid user"}
        assert state["except"] is True
        assert state["finally"] is True
        assert fake_database["rick"] == "Rick Sanchez"
    
    
    def test_dependency_no_exception():
        assert state["except"] is False
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Feb 24 23:06:37 GMT 2024
    - 1.9K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_dependencies/test_tutorial008b_an.py

        assert response.status_code == 400, response.text
        assert response.json() == {"detail": "Owner error: Rick"}
    
    
    def test_get_item():
        response = client.get("/items/portal-gun")
        assert response.status_code == 200, response.text
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Dec 26 20:37:34 GMT 2023
    - 700 bytes
    - Viewed (0)
  7. docs_src/dependencies/tutorial008b_an_py39.py

    
    data = {
        "plumbus": {"description": "Freshly pickled plumbus", "owner": "Morty"},
        "portal-gun": {"description": "Gun to create portals", "owner": "Rick"},
    }
    
    
    class OwnerError(Exception):
        pass
    
    
    def get_username():
        try:
            yield "Rick"
        except OwnerError as e:
            raise HTTPException(status_code=400, detail=f"Owner error: {e}")
    
    
    @app.get("/items/{item_id}")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Dec 26 20:37:34 GMT 2023
    - 775 bytes
    - Viewed (0)
  8. tests/test_tutorial/test_dependencies/test_tutorial008b.py

        assert response.status_code == 400, response.text
        assert response.json() == {"detail": "Owner error: Rick"}
    
    
    def test_get_item():
        response = client.get("/items/portal-gun")
        assert response.status_code == 200, response.text
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Dec 26 20:37:34 GMT 2023
    - 697 bytes
    - Viewed (0)
  9. tests/test_route_scope.py

    
    client = TestClient(app)
    
    
    def test_get():
        response = client.get("/users/rick")
        assert response.status_code == 200, response.text
        assert response.json() == {"user_id": "rick", "path": "/users/{user_id}"}
    
    
    def test_invalid_method_doesnt_match():
        response = client.post("/users/rick")
        assert response.status_code == 405, response.text
    
    
    def test_invalid_path_doesnt_match():
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Feb 08 10:23:07 GMT 2023
    - 1.5K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_dependencies/test_tutorial008b_an_py39.py

        assert response.status_code == 400, response.text
        assert response.json() == {"detail": "Owner error: Rick"}
    
    
    @needs_py39
    def test_get_item(client: TestClient):
        response = client.get("/items/portal-gun")
        assert response.status_code == 200, response.text
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Feb 24 23:06:37 GMT 2024
    - 918 bytes
    - Viewed (0)
Back to top