Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 907 for fdef (0.02 sec)

  1. tests/test_tutorial/test_security/test_tutorial005.py

    
    def test_verify_password():
        assert verify_password("secret", fake_users_db["johndoe"]["hashed_password"])
    
    
    def test_get_password_hash():
        assert get_password_hash("secretalice")
    
    
    def test_create_access_token():
        access_token = create_access_token(data={"data": "foo"})
        assert access_token
    
    
    def test_token_no_sub():
        response = client.get(
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Mar 13 19:07:10 UTC 2024
    - 15.4K bytes
    - Viewed (0)
  2. tests/test_datastructures.py

    
    # TODO: remove when deprecating Pydantic v1
    def test_upload_file_invalid():
        with pytest.raises(ValueError):
            UploadFile.validate("not a Starlette UploadFile")
    
    
    def test_upload_file_invalid_pydantic_v2():
        with pytest.raises(ValueError):
            UploadFile._validate("not a Starlette UploadFile", {})
    
    
    def test_default_placeholder_equals():
        placeholder_1 = Default("a")
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Oct 18 12:36:40 UTC 2023
    - 2K bytes
    - Viewed (0)
  3. tests/test_dependency_cache.py

    counter_holder = {"counter": 0}
    
    
    async def dep_counter():
        counter_holder["counter"] += 1
        return counter_holder["counter"]
    
    
    async def super_dep(count: int = Depends(dep_counter)):
        return count
    
    
    @app.get("/counter/")
    async def get_counter(count: int = Depends(dep_counter)):
        return {"counter": count}
    
    
    @app.get("/sub-counter/")
    async def get_sub_counter(
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Aug 23 13:30:24 UTC 2022
    - 2.7K bytes
    - Viewed (0)
  4. docs_src/websockets/tutorial003_py39.py

    </html>
    """
    
    
    class ConnectionManager:
        def __init__(self):
            self.active_connections: list[WebSocket] = []
    
        async def connect(self, websocket: WebSocket):
            await websocket.accept()
            self.active_connections.append(websocket)
    
        def disconnect(self, websocket: WebSocket):
            self.active_connections.remove(websocket)
    
        async def send_personal_message(self, message: str, websocket: WebSocket):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 2.5K bytes
    - Viewed (0)
  5. build-logic/documentation/src/test/groovy/gradlebuild/docs/UserGuideTransformTaskTest.groovy

            def actual = UserGuideTransformTask.normalise(content)
    
            then:
            actual == "test\ntest\ntest"
        }
    
        def stripsLeadingWhitespaceOnSingleLine() {
            given:
            String content = "     test"
            when:
            def actual = UserGuideTransformTask.normalise(content)
    
            then:
            actual == "test"
        }
    
        def preservesFormattingWithIndentedMultiline() {
            given:
    Registered: Wed Nov 06 11:36:14 UTC 2024
    - Last Modified: Tue Jul 27 19:28:51 UTC 2021
    - 1.9K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_security/test_tutorial003_an_py310.py

    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py310
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.security.tutorial003_an_py310 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_py310
    def test_login(client: TestClient):
        response = client.post("/token", data={"username": "johndoe", "password": "secret"})
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 8.4K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_security/test_tutorial003_py310.py

    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py310
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.security.tutorial003_py310 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_py310
    def test_login(client: TestClient):
        response = client.post("/token", data={"username": "johndoe", "password": "secret"})
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 8.4K bytes
    - Viewed (0)
  8. disabled-Jenkinsfile

    def buildOs = 'linux'
    def buildJdk = '17'
    def buildMvn = '3.8.x'
    def runITsOses = ['linux']
    def runITsJdks = ['17', '21']
    def runITsMvn = '3.8.x'
    def runITscommand = "mvn clean install -Prun-its,embedded -B -U -V" // -DmavenDistro=... -Dmaven.test.failure.ignore=true
    def tests
    
    try {
    
    def osNode = jenkinsEnv.labelForOS(buildOs)
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Mon Sep 30 14:11:55 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  9. bin/diff_yaml.py

    import sys
    import yaml  # pyyaml
    
    # returns fully qualified resource name of the k8s resource
    
    
    def by_resource_name(res):
        if res is None:
            return ""
    
        return "{}::{}::{}".format(res['apiVersion'],
                                   res['kind'],
                                   res['metadata']['name'])
    
    
    def keydiff(k0, k1):
        k0s = set(k0)
        k1s = set(k1)
        added = k1s - k0s
        removed = k0s - k1s
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Wed Mar 03 16:14:57 UTC 2021
    - 4.5K bytes
    - Viewed (0)
  10. docs/em/docs/async.md

    ### ๐ŸŽง-๐Ÿ”—
    
    ๐Ÿ‘† ๐Ÿ’ช โœ”๏ธ ๐Ÿ’— ๐Ÿ”— &amp; [๐ŸŽง-๐Ÿ”—](tutorial/dependencies/sub-dependencies.md){.internal-link target=_blank} ๐Ÿšซ ๐Ÿ”  ๐ŸŽ (๐Ÿ”ข ๐Ÿ”ข ๐Ÿ”‘), ๐Ÿ‘ซ ๐Ÿ’ช โœ โฎ๏ธ `async def` &amp; โฎ๏ธ ๐Ÿ˜ `def`. โšซ๏ธ ๐Ÿ”œ ๐Ÿ‘ท, &amp; ๐Ÿ• โœ โฎ๏ธ ๐Ÿ˜ `def` ๐Ÿ”œ ๐Ÿค™ ๐Ÿ”› ๐Ÿ”ข ๐Ÿงต (โšช๏ธโžก๏ธ ๐Ÿงต) โ†ฉ๏ธ โž– "โŒ›".
    
    ### ๐ŸŽ ๐Ÿš™ ๐Ÿ”ข
    
    ๐Ÿ™† ๐ŸŽ ๐Ÿš™ ๐Ÿ”ข ๐Ÿ‘ˆ ๐Ÿ‘† ๐Ÿค™ ๐Ÿ”— ๐Ÿ’ช โœ โฎ๏ธ ๐Ÿ˜ `def` โš–๏ธ `async def` &amp; FastAPI ๐Ÿ† ๐Ÿšซ ๐Ÿ“‰ ๐ŸŒŒ ๐Ÿ‘† ๐Ÿค™ โšซ๏ธ.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Aug 06 04:48:30 UTC 2024
    - 18.7K bytes
    - Viewed (0)
Back to top