Search Options

Results per page
Sort
Preferred Languages
Advance

Results 481 - 490 of 511 for testClient2 (0.11 sec)

  1. tests/test_path.py

    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    from .main import app
    
    client = TestClient(app)
    
    
    def test_text_get():
        response = client.get("/text")
        assert response.status_code == 200, response.text
        assert response.json() == "Hello World"
    
    
    def test_nonexistent():
        response = client.get("/nonexistent")
        assert response.status_code == 404, response.text
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 34.4K bytes
    - Viewed (0)
  2. tests/test_response_model_as_return_annotation.py

    from typing import List, Union
    
    import pytest
    from fastapi import FastAPI
    from fastapi.exceptions import FastAPIError, ResponseValidationError
    from fastapi.responses import JSONResponse, Response
    from fastapi.testclient import TestClient
    from pydantic import BaseModel
    
    
    class BaseUser(BaseModel):
        name: str
    
    
    class User(BaseUser):
        surname: str
    
    
    class DBUser(User):
        password_hash: str
    
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Mon Aug 14 09:49:57 UTC 2023
    - 47.7K bytes
    - Viewed (0)
  3. docs/en/mkdocs.yml

        - reference/openapi/docs.md
        - reference/openapi/models.md
      - reference/security/index.md
      - reference/encoders.md
      - reference/staticfiles.md
      - reference/templating.md
      - reference/testclient.md
    - fastapi-people.md
    - Resources:
      - resources/index.md
      - help-fastapi.md
      - contributing.md
      - project-generation.md
      - external-links.md
      - newsletter.md
      - management-tasks.md
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Oct 22 20:28:02 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  4. docs/de/docs/features.md

    * **WebSocket**-Unterstützung.
    * Hintergrundaufgaben im selben Prozess.
    * Ereignisse beim Starten und Herunterfahren.
    * Testclient baut auf HTTPX auf.
    * **CORS**, GZip, statische Dateien, Responses streamen.
    * **Sitzungs- und Cookie**-Unterstützung.
    * 100 % Testabdeckung.
    * 100 % Typen annotierte Codebasis.
    
    ## Pydantic's Merkmale
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Aug 15 23:30:12 UTC 2024
    - 10.7K bytes
    - Viewed (0)
  5. docs/uk/docs/index.md

    
    Starlette використовує:
    
    * <a href="https://www.python-httpx.org" target="_blank"><code>httpx</code></a> - Необхідно, якщо Ви хочете використовувати `TestClient`.
    * <a href="https://jinja.palletsprojects.com" target="_blank"><code>jinja2</code></a> - Необхідно, якщо Ви хочете використовувати шаблони як конфігурацію за замовчуванням.
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 20 19:20:23 UTC 2024
    - 24.2K bytes
    - Viewed (0)
  6. docs/vi/docs/index.md

    Sử dụng Starlette:
    
    * <a href="https://www.python-httpx.org" target="_blank"><code>httpx</code></a> - Bắt buộc nếu bạn muốn sử dụng `TestClient`.
    * <a href="https://jinja.palletsprojects.com" target="_blank"><code>jinja2</code></a> - Bắt buộc nếu bạn muốn sử dụng cấu hình template engine mặc định.
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 20 19:20:23 UTC 2024
    - 21.9K bytes
    - Viewed (0)
  7. docs/zh/docs/index.md

    用于 Starlette:
    
    * <a href="https://www.python-httpx.org" target="_blank"><code>httpx</code></a> - 使用 `TestClient` 时安装。
    * <a href="https://jinja.palletsprojects.com" target="_blank"><code>jinja2</code></a> - 使用默认模板配置时安装。
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 20 19:20:23 UTC 2024
    - 18.2K bytes
    - Viewed (0)
  8. docs/ru/docs/index.md

    Используется Starlette:
    
    * <a href="https://www.python-httpx.org" target="_blank"><code>HTTPX</code></a> - Обязательно, если вы хотите использовать `TestClient`.
    * <a href="https://jinja.palletsprojects.com" target="_blank"><code>jinja2</code></a> - Обязательно, если вы хотите использовать конфигурацию шаблона по умолчанию.
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 20 19:20:23 UTC 2024
    - 25.8K bytes
    - Viewed (0)
  9. docs/pl/docs/index.md

    Używane przez Starlette:
    
    * <a href="https://www.python-httpx.org" target="_blank"><code>httpx</code></a> - Wymagane jeżeli chcesz korzystać z `TestClient`.
    * <a href="https://github.com/Tinche/aiofiles" target="_blank"><code>aiofiles</code></a> - Wymagane jeżeli chcesz korzystać z `FileResponse` albo `StaticFiles`.
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 20 19:20:23 UTC 2024
    - 19.3K bytes
    - Viewed (0)
  10. tests/test_include_router_defaults_overrides.py

    import warnings
    
    import pytest
    from fastapi import APIRouter, Depends, FastAPI, Response
    from fastapi.responses import JSONResponse
    from fastapi.testclient import TestClient
    
    
    class ResponseLevel0(JSONResponse):
        media_type = "application/x-level-0"
    
    
    class ResponseLevel1(JSONResponse):
        media_type = "application/x-level-1"
    
    
    class ResponseLevel2(JSONResponse):
        media_type = "application/x-level-2"
    
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 358.6K bytes
    - Viewed (0)
Back to top