Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 87 for get_main (0.25 sec)

  1. docs/uk/docs/tutorial/testing.md

    {* ../../docs_src/app_testing/main.py *}
    
    ### Файл тестування
    
    Ви можете створити файл `test_main.py` з Вашими тестами. Він може знаходитися в тому ж пакеті Python (у тій самій директорії з файлом `__init__.py`):
    
    
    ``` hl_lines="5"
    .
    ├── app
    │   ├── __init__.py
    │   ├── main.py
    │   └── test_main.py
    ```
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Oct 11 17:48:49 UTC 2025
    - 9.5K bytes
    - Viewed (0)
  2. src/test/java/jcifs/ntlmssp/Type3MessageTest.java

            // When
            Type3Message parsed = new Type3Message(messageBytes);
    
            // Then
            // Note: getType() method does not exist, so we cannot compare message types
            assertEquals(original.getDomain(), parsed.getDomain());
            assertEquals(original.getUser(), parsed.getUser());
            assertEquals(original.getWorkstation(), parsed.getWorkstation());
        }
    
        @Test
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 17.3K bytes
    - Viewed (0)
  3. docs/ja/docs/tutorial/testing.md

    ### **FastAPI** アプリファイル
    
    **FastAPI** アプリに `main.py` ファイルがあるとします:
    
    {* ../../docs_src/app_testing/main.py *}
    
    ### テストファイル
    
    次に、テストを含む `test_main.py` ファイルを作成し、`main` モジュール (`main.py`) から `app` をインポートします:
    
    {* ../../docs_src/app_testing/test_main.py *}
    
    ## テスト: 例の拡張
    
    次に、この例を拡張し、詳細を追加して、さまざまなパーツをテストする方法を確認しましょう。
    
    
    ### 拡張版 **FastAPI** アプリファイル
    
    **FastAPI** アプリに `main_b.py` ファイルがあるとします。
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Oct 11 17:48:49 UTC 2025
    - 5.6K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_testing/test_tutorial003.py

    import pytest
    
    
    def test_main():
        with pytest.warns(DeprecationWarning):
            from docs_src.app_testing.tutorial003_py39 import test_read_items
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 172 bytes
    - Viewed (0)
  5. docs/ko/docs/advanced/async-tests.md

    ```
    .
    ├── app
    │   ├── __init__.py
    │   ├── main.py
    │   └── test_main.py
    ```
    
     `main.py`는 아래와 같아야 합니다:
    
    {* ../../docs_src/async_tests/main.py *}
    
    `test_main.py` 파일은 `main.py`에 대한 테스트가 있을 텐데, 다음과 같을 수 있습니다:
    
    {* ../../docs_src/async_tests/test_main.py *}
    
    ## 실행하기
    
    아래의 명령어로 테스트 코드를 실행합니다:
    
    <div class="termy">
    
    ```console
    $ pytest
    
    ---> 100%
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Tue Dec 10 11:03:16 UTC 2024
    - 4.7K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_behind_a_proxy/test_tutorial004.py

    from fastapi.testclient import TestClient
    from inline_snapshot import snapshot
    
    from docs_src.behind_a_proxy.tutorial004_py39 import app
    
    client = TestClient(app)
    
    
    def test_main():
        response = client.get("/app")
        assert response.status_code == 200
        assert response.json() == {"message": "Hello World", "root_path": "/api/v1"}
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 1.4K bytes
    - Viewed (0)
  7. tests/test_deprecated_openapi_prefix.py

    app = FastAPI(openapi_prefix="/api/v1")
    
    
    @app.get("/app")
    def read_main(request: Request):
        return {"message": "Hello World", "root_path": request.scope.get("root_path")}
    
    
    client = TestClient(app)
    
    
    def test_main():
        response = client.get("/app")
        assert response.status_code == 200
        assert response.json() == {"message": "Hello World", "root_path": "/api/v1"}
    
    
    def test_openapi():
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 1.2K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_templates/test_tutorial001.py

    import os
    import shutil
    
    from fastapi.testclient import TestClient
    
    
    def test_main():
        if os.path.isdir("./static"):  # pragma: nocover
            shutil.rmtree("./static")
        if os.path.isdir("./templates"):  # pragma: nocover
            shutil.rmtree("./templates")
        shutil.copytree("./docs_src/templates/templates/", "./templates")
        shutil.copytree("./docs_src/templates/static/", "./static")
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 915 bytes
    - Viewed (0)
  9. tests/test_tutorial/test_async_tests/test_main_a.py

    import pytest
    
    from docs_src.async_tests.app_a_py39.test_main import test_root
    
    
    @pytest.mark.anyio
    async def test_async_testing():
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 154 bytes
    - Viewed (0)
  10. tests/test_tutorial/test_behind_a_proxy/test_tutorial001.py

    from fastapi.testclient import TestClient
    
    from docs_src.behind_a_proxy.tutorial001_py39 import app
    
    client = TestClient(app, root_path="/api/v1")
    
    
    def test_main():
        response = client.get("/app")
        assert response.status_code == 200
        assert response.json() == {"message": "Hello World", "root_path": "/api/v1"}
    
    
    def test_openapi():
        response = client.get("/openapi.json")
        assert response.status_code == 200
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 1K bytes
    - Viewed (0)
Back to top