Search Options

Results per page
Sort
Preferred Languages
Advance

Results 171 - 180 of 1,379 for def2 (0.06 sec)

  1. tests/test_dependency_contextvars.py

    )
    
    app = FastAPI()
    
    
    async def set_up_request_state_dependency():
        request_state = {"user": "deadpond"}
        contextvar_token = legacy_request_state_context_var.set(request_state)
        yield request_state
        legacy_request_state_context_var.reset(contextvar_token)
    
    
    @app.middleware("http")
    async def custom_middleware(
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Feb 17 12:40:12 UTC 2022
    - 1.5K bytes
    - Viewed (0)
  2. api/maven-api-core/src/main/java/org/apache/maven/api/feature/Features.java

            return doGet(userProperties != null ? userProperties.get(key) : null, def);
        }
    
        private static boolean doGet(Map<String, ?> userProperties, String key, boolean def) {
            return doGet(userProperties != null ? userProperties.get(key) : null, def);
        }
    
        private static boolean doGet(Object val, boolean def) {
            if (val instanceof Boolean) {
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Wed Sep 11 16:31:06 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  3. docs/es/docs/async.md

    ### Subdependencias
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Mon Aug 19 18:15:21 UTC 2024
    - 24.9K bytes
    - Viewed (0)
  4. tests/test_modules_same_name_body/test_main.py

    
    def test_post_b():
        data = {"a": 2, "b": "foo"}
        response = client.post("/b/compute/", json=data)
        assert response.status_code == 200, response.text
        data = response.json()
    
    
    def test_post_b_invalid():
        data = {"a": "bar", "b": "foo"}
        response = client.post("/b/compute/", json=data)
        assert response.status_code == 422, response.text
    
    
    def test_openapi_schema():
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 5.6K bytes
    - Viewed (0)
  5. cmd/object-api-utils_test.go

    		// Remove doubled slash
    		{"abc//def//ghi", "abc/def/ghi"},
    		{"//abc", "/abc"},
    		{"///abc", "/abc"},
    		{"//abc//", "/abc"},
    		{"abc//", "abc"},
    
    		// Remove . elements
    		{"abc/./def", "abc/def"},
    		{"/./abc/def", "/abc/def"},
    		{"abc/.", "abc"},
    
    		// Remove .. elements
    		{"abc/def/ghi/../jkl", "abc/def/jkl"},
    		{"abc/def/../ghi/../jkl", "abc/jkl"},
    		{"abc/def/..", "abc"},
    		{"abc/def/../..", "."},
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Aug 08 15:29:58 UTC 2024
    - 24.1K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_body_updates/test_tutorial001_py39.py

    from fastapi.testclient import TestClient
    
    from ...utils import needs_py39, needs_pydanticv1, needs_pydanticv2
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.body_updates.tutorial001_py39 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_py39
    def test_get(client: TestClient):
        response = client.get("/items/baz")
        assert response.status_code == 200, response.text
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Sep 28 04:14:40 UTC 2023
    - 11.8K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_request_form_models/test_tutorial001.py

    import pytest
    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.request_form_models.tutorial001 import app
    
        client = TestClient(app)
        return client
    
    
    def test_post_body_form(client: TestClient):
        response = client.post("/login/", data={"username": "Foo", "password": "secret"})
        assert response.status_code == 200
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Sep 05 15:16:50 UTC 2024
    - 7.4K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_request_forms/test_tutorial001.py

    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.request_forms.tutorial001 import app
    
        client = TestClient(app)
        return client
    
    
    def test_post_body_form(client: TestClient):
        response = client.post("/login/", data={"username": "Foo", "password": "secret"})
        assert response.status_code == 200
        assert response.json() == {"username": "Foo"}
    
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_request_forms/test_tutorial001_an.py

    import pytest
    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.request_forms.tutorial001_an import app
    
        client = TestClient(app)
        return client
    
    
    def test_post_body_form(client: TestClient):
        response = client.post("/login/", data={"username": "Foo", "password": "secret"})
        assert response.status_code == 200
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_request_forms/test_tutorial001_an_py39.py

    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py39
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.request_forms.tutorial001_an_py39 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_py39
    def test_post_body_form(client: TestClient):
        response = client.post("/login/", data={"username": "Foo", "password": "secret"})
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 7.6K bytes
    - Viewed (0)
Back to top