Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 41 for Case (0.16 sec)

  1. docs/sts/client_grants/__init__.py

                )
            else:
                return None
    
        def _create_credentials_fetcher(self):
            method = self.METHOD
    
            def fetch_credentials():
                # HTTP headers are case insensitive filter out
                # all duplicate headers and pick one.
                headers = {}
                headers['content-type'] = 'application/x-www-form-urlencoded'
    Python
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Apr 23 18:58:53 GMT 2021
    - 4.6K bytes
    - Viewed (1)
  2. tests/test_schema_extra_examples.py

                    ],
                ),
            ):
                return item
    
        # TODO: enable these tests once/if Form(embed=False) is supported
        # TODO: In that case, define if File() should support example/examples too
        # @app.post("/form_example")
        # def form_example(firstname: str = Form(example="John")):
        #     return firstname
    
        # @app.post("/form_examples")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Oct 24 20:26:06 GMT 2023
    - 37.7K bytes
    - Viewed (0)
  3. tests/test_security_http_base.py

    
    client = TestClient(app)
    
    
    def test_security_http_base():
        response = client.get("/users/me", headers={"Authorization": "Other foobar"})
        assert response.status_code == 200, response.text
        assert response.json() == {"scheme": "Other", "credentials": "foobar"}
    
    
    def test_security_http_base_no_credentials():
        response = client.get("/users/me")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 1.7K bytes
    - Viewed (0)
  4. tests/test_security_http_base_optional.py

    
    client = TestClient(app)
    
    
    def test_security_http_base():
        response = client.get("/users/me", headers={"Authorization": "Other foobar"})
        assert response.status_code == 200, response.text
        assert response.json() == {"scheme": "Other", "credentials": "foobar"}
    
    
    def test_security_http_base_no_credentials():
        response = client.get("/users/me")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 1.9K bytes
    - Viewed (0)
  5. tests/test_operations_signatures.py

    
    def test_signatures_consistency():
        base_sig = inspect.signature(APIRouter.get)
        for method_name in method_names:
            router_method = getattr(APIRouter, method_name)
            app_method = getattr(FastAPI, method_name)
            router_sig = inspect.signature(router_method)
            app_sig = inspect.signature(app_method)
            param: inspect.Parameter
            for key, param in base_sig.parameters.items():
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Mon May 27 12:08:13 GMT 2019
    - 934 bytes
    - Viewed (0)
  6. docs_src/sql_databases/sql_app_py39/tests/test_sql_app.py

    from sqlalchemy.orm import sessionmaker
    
    from ..database import Base
    from ..main import app, get_db
    
    SQLALCHEMY_DATABASE_URL = "sqlite:///./test.db"
    
    engine = create_engine(
        SQLALCHEMY_DATABASE_URL, connect_args={"check_same_thread": False}
    )
    TestingSessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)
    
    
    Base.metadata.create_all(bind=engine)
    
    
    def override_get_db():
        try:
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jan 07 14:11:31 GMT 2022
    - 1.2K bytes
    - Viewed (0)
  7. ci/official/utilities/extract_resultstore_links.py

        command_type = invocation_results.get('command_type')
    
        case_attrib = attrib.copy()
        if command_type:
          command_type = command_type.title()
          case_name = f'{command_type} invocation {invocation_id}'
        else:
          case_name = f' Invocation {invocation_id}'
        case_attrib.update({'name': case_name,
                            'status': 'run', 'result': 'completed'})
    
    Python
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Wed Nov 08 17:50:27 GMT 2023
    - 10.9K bytes
    - Viewed (0)
  8. docs_src/async_tests/test_main.py

    import pytest
    from httpx import AsyncClient
    
    from .main import app
    
    
    @pytest.mark.anyio
    async def test_root():
        async with AsyncClient(app=app, base_url="http://test") as ac:
            response = await ac.get("/")
        assert response.status_code == 200
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Oct 06 15:32:11 GMT 2021
    - 306 bytes
    - Viewed (0)
  9. tests/test_tutorial/test_advanced_middleware/test_tutorial001.py

    from fastapi.testclient import TestClient
    
    from docs_src.advanced_middleware.tutorial001 import app
    
    
    def test_middleware():
        client = TestClient(app, base_url="https://testserver")
        response = client.get("/")
        assert response.status_code == 200, response.text
    
        client = TestClient(app)
        response = client.get("/", follow_redirects=False)
        assert response.status_code == 307, response.text
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sun Nov 13 14:26:09 GMT 2022
    - 474 bytes
    - Viewed (0)
  10. fastapi/dependencies/models.py

    from typing import Any, Callable, List, Optional, Sequence
    
    from fastapi._compat import ModelField
    from fastapi.security.base import SecurityBase
    
    
    class SecurityRequirement:
        def __init__(
            self, security_scheme: SecurityBase, scopes: Optional[Sequence[str]] = None
        ):
            self.security_scheme = security_scheme
            self.scopes = scopes
    
    
    class Dependant:
        def __init__(
            self,
            *,
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 2.4K bytes
    - Viewed (0)
Back to top