Search Options

Results per page
Sort
Preferred Languages
Advance

Results 361 - 370 of 1,212 for texi (0.05 sec)

  1. tests/test_tutorial/test_metadata/test_tutorial001_1.py

    client = TestClient(app)
    
    
    def test_items():
        response = client.get("/items/")
        assert response.status_code == 200, response.text
        assert response.json() == [{"name": "Katana"}]
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "openapi": "3.1.0",
            "info": {
                "title": "ChimichangApp",
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 1.7K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_security/test_tutorial006_an_py39.py

        assert response.status_code == 200, response.text
        assert response.json() == {"username": "john", "password": "secret"}
    
    
    @needs_py39
    def test_security_http_basic_no_credentials(client: TestClient):
        response = client.get("/users/me")
        assert response.json() == {"detail": "Not authenticated"}
        assert response.status_code == 401, response.text
        assert response.headers["WWW-Authenticate"] == "Basic"
    
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 2.5K bytes
    - Viewed (0)
  3. src/main/webapp/css/admin/adminlte.min.css

    (min-width:576px){.text-sm-left{text-align:left!important}.text-sm-right{text-align:right!important}.text-sm-center{text-align:center!important}}@media (min-width:768px){.text-md-left{text-align:left!important}.text-md-right{text-align:right!important}.text-md-center{text-align:center!important}}@media (min-width:992px){.text-lg-left{text-align:left!important}.text-lg-right{text-align:right!important}.text-lg-center{text-align:center!important}}@media (min-width:1200px){.text-xl-left{text-align:left!impor...
    Registered: Thu Oct 31 13:40:30 UTC 2024
    - Last Modified: Sat Oct 26 01:49:09 UTC 2024
    - 1.3M bytes
    - Viewed (0)
  4. tests/test_tutorial/test_events/test_tutorial001.py

            response = client.get("/items/foo")
            assert response.status_code == 200, response.text
            assert response.json() == {"name": "Fighters"}
    
    
    def test_openapi_schema(app: FastAPI):
        with TestClient(app) as client:
            response = client.get("/openapi.json")
            assert response.status_code == 200, response.text
            assert response.json() == {
                "openapi": "3.1.0",
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Oct 18 12:36:40 UTC 2023
    - 3.6K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_path_operation_configurations/test_tutorial005.py

        assert response.status_code == 200, response.text
        assert response.json() == {
            "name": "Foo",
            "price": 42,
            "description": None,
            "tax": None,
            "tags": [],
        }
    
    
    @needs_pydanticv2
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "openapi": "3.1.0",
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Sep 28 04:14:40 UTC 2023
    - 8.7K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_custom_response/test_tutorial004.py

        """
    
    
    def test_get_custom_response():
        response = client.get("/items/")
        assert response.status_code == 200, response.text
        assert response.text == html_contents
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "openapi": "3.1.0",
            "info": {"title": "FastAPI", "version": "0.1.0"},
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 1.2K bytes
    - Viewed (0)
  7. tests/test_security_http_basic_realm_description.py

        assert response.status_code == 200, response.text
        assert response.json() == {"username": "john", "password": "secret"}
    
    
    def test_security_http_basic_no_credentials():
        response = client.get("/users/me")
        assert response.json() == {"detail": "Not authenticated"}
        assert response.status_code == 401, response.text
        assert response.headers["WWW-Authenticate"] == 'Basic realm="simple"'
    
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 2.8K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_openapi_webhooks/test_tutorial001.py

        response = client.get("/users/")
        assert response.status_code == 200, response.text
        assert response.json() == ["Rick", "Morty"]
    
    
    def test_dummy_webhook():
        # Just for coverage
        app.webhooks.routes[0].endpoint({})
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "openapi": "3.1.0",
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Oct 20 09:00:44 UTC 2023
    - 4.4K bytes
    - Viewed (0)
  9. docs/en/docs/advanced/custom-response.md

    * `media_type` - A `str` giving the media type. E.g. `"text/html"`.
    
    FastAPI (actually Starlette) will automatically include a Content-Length header. It will also include a Content-Type header, based on the `media_type` and appending a charset for text types.
    
    ```Python hl_lines="1  18"
    {!../../docs_src/response_directly/tutorial002.py!}
    ```
    
    ### `HTMLResponse`
    
    Takes some text or bytes and returns an HTML response, as you read above.
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 12K bytes
    - Viewed (0)
  10. tests/test_infer_param_optionality.py

        response = client.get("/users")
        assert response.status_code == 200, response.text
        assert response.json() == [{"user_id": "u1"}, {"user_id": "u2"}]
    
    
    def test_get_user():
        """Check that /users/{user_id} returns expected data"""
        response = client.get("/users/abc123")
        assert response.status_code == 200, response.text
        assert response.json() == {"user_id": "abc123"}
    
    
    def test_get_items_1():
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 13.3K bytes
    - Viewed (0)
Back to top