Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 80 for some (0.14 sec)

  1. tests/test_tutorial/test_websockets/test_tutorial002_py310.py

        with pytest.raises(WebSocketDisconnect):
            with client.websocket_connect("/items/bar/ws?token=some-token") as websocket:
                message = "Message one"
                websocket.send_text(message)
                data = websocket.receive_text()
                assert data == "Session cookie or query token value is: some-token"
                data = websocket.receive_text()
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 3.9K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_background_tasks/test_tutorial002_an.py

        if log.is_file():
            os.remove(log)  # pragma: no cover
        response = client.post("/send-notification/******@****.***?q=some-query")
        assert response.status_code == 200, response.text
        assert response.json() == {"message": "Message sent"}
        with open("./log.txt") as f:
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 571 bytes
    - Viewed (0)
  3. tests/test_tutorial/test_background_tasks/test_tutorial002_an_py310.py

        if log.is_file():
            os.remove(log)  # pragma: no cover
        response = client.post("/send-notification/******@****.***?q=some-query")
        assert response.status_code == 200, response.text
        assert response.json() == {"message": "Message sent"}
        with open("./log.txt") as f:
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 631 bytes
    - Viewed (0)
  4. tests/test_tutorial/test_body/test_tutorial001.py

        response = client.post(
            "/items/", json={"name": "Foo", "price": "50.5", "description": "Some Foo"}
        )
        assert response.status_code == 200
        assert response.json() == {
            "name": "Foo",
            "price": 50.5,
            "description": "Some Foo",
            "tax": None,
        }
    
    
    def test_post_with_str_float_description_tax(client: TestClient):
        response = client.post(
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 14.7K bytes
    - Viewed (4)
  5. tests/test_tutorial/test_body/test_tutorial001_py310.py

        response = client.post(
            "/items/", json={"name": "Foo", "price": "50.5", "description": "Some Foo"}
        )
        assert response.status_code == 200
        assert response.json() == {
            "name": "Foo",
            "price": 50.5,
            "description": "Some Foo",
            "tax": None,
        }
    
    
    @needs_py310
    def test_post_with_str_float_description_tax(client: TestClient):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 15K bytes
    - Viewed (1)
  6. tests/test_tutorial/test_websockets/test_tutorial002_an_py39.py

        with pytest.raises(WebSocketDisconnect):
            with client.websocket_connect("/items/bar/ws?token=some-token") as websocket:
                message = "Message one"
                websocket.send_text(message)
                data = websocket.receive_text()
                assert data == "Session cookie or query token value is: some-token"
                data = websocket.receive_text()
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 3.9K bytes
    - Viewed (0)
  7. docs_src/websockets/tutorial002_an_py310.py

            <form action="" onsubmit="sendMessage(event)">
                <label>Item ID: <input type="text" id="itemId" autocomplete="off" value="foo"/></label>
                <label>Token: <input type="text" id="token" autocomplete="off" value="some-key-token"/></label>
                <button onclick="connect(event)">Connect</button>
                <hr>
                <label>Message: <input type="text" id="messageText" autocomplete="off"/></label>
                <button>Send</button>
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 2.8K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_background_tasks/test_tutorial002.py

        if log.is_file():
            os.remove(log)  # pragma: no cover
        response = client.post("/send-notification/******@****.***?q=some-query")
        assert response.status_code == 200, response.text
        assert response.json() == {"message": "Message sent"}
        with open("./log.txt") as f:
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Jul 09 18:06:12 GMT 2020
    - 568 bytes
    - Viewed (0)
  9. docs_src/path_operation_advanced_configuration/tutorial001.py

    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.get("/items/", operation_id="some_specific_id_you_define")
    async def read_items():
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Mar 26 19:09:53 GMT 2020
    - 167 bytes
    - Viewed (0)
  10. docs_src/custom_response/tutorial004.py

    from fastapi import FastAPI
    from fastapi.responses import HTMLResponse
    
    app = FastAPI()
    
    
    def generate_html_response():
        html_content = """
        <html>
            <head>
                <title>Some HTML in here</title>
            </head>
            <body>
                <h1>Look ma! HTML!</h1>
            </body>
        </html>
        """
        return HTMLResponse(content=html_content, status_code=200)
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Mar 26 19:09:53 GMT 2020
    - 491 bytes
    - Viewed (0)
Back to top