Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 33 for Testing (0.17 sec)

  1. tests/test_tutorial/test_sql_databases/test_testing_databases.py

    import importlib
    import os
    from pathlib import Path
    
    import pytest
    
    from ...utils import needs_pydanticv1
    
    
    # TODO: pv2 add version with Pydantic v2
    @needs_pydanticv1
    def test_testing_dbs(tmp_path_factory: pytest.TempPathFactory):
        tmp_path = tmp_path_factory.mktemp("data")
        cwd = os.getcwd()
        os.chdir(tmp_path)
        test_db = Path("./test.db")
        if test_db.is_file():  # pragma: nocover
            test_db.unlink()
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 788 bytes
    - Viewed (0)
  2. tests/test_tutorial/test_sql_databases/test_testing_databases_py39.py

    import importlib
    import os
    from pathlib import Path
    
    import pytest
    
    from ...utils import needs_py39, needs_pydanticv1
    
    
    @needs_py39
    # TODO: pv2 add version with Pydantic v2
    @needs_pydanticv1
    def test_testing_dbs_py39(tmp_path_factory: pytest.TempPathFactory):
        tmp_path = tmp_path_factory.mktemp("data")
        cwd = os.getcwd()
        os.chdir(tmp_path)
        test_db = Path("./test.db")
        if test_db.is_file():  # pragma: nocover
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 822 bytes
    - Viewed (0)
  3. tests/test_tutorial/test_sql_databases/test_testing_databases_py310.py

    import importlib
    import os
    from pathlib import Path
    
    import pytest
    
    from ...utils import needs_py310, needs_pydanticv1
    
    
    @needs_py310
    # TODO: pv2 add version with Pydantic v2
    @needs_pydanticv1
    def test_testing_dbs_py39(tmp_path_factory: pytest.TempPathFactory):
        tmp_path = tmp_path_factory.mktemp("data")
        cwd = os.getcwd()
        os.chdir(tmp_path)
        test_db = Path("./test.db")
        if test_db.is_file():  # pragma: nocover
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 825 bytes
    - Viewed (0)
  4. tests/test_tutorial/test_testing_dependencies/test_tutorial001_an_py39.py

    from ...utils import needs_py39
    
    
    @needs_py39
    def test_override_in_items_run():
        from docs_src.dependency_testing.tutorial001_an_py39 import test_override_in_items
    
        test_override_in_items()
    
    
    @needs_py39
    def test_override_in_items_with_q_run():
        from docs_src.dependency_testing.tutorial001_an_py39 import (
            test_override_in_items_with_q,
        )
    
        test_override_in_items_with_q()
    
    
    @needs_py39
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 2K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_testing/test_main_b_an_py310.py

    from ...utils import needs_py310
    
    
    @needs_py310
    def test_app():
        from docs_src.app_testing.app_b_an_py310 import test_main
    
        test_main.test_create_existing_item()
        test_main.test_create_item()
        test_main.test_create_item_bad_token()
        test_main.test_read_nonexistent_item()
        test_main.test_read_item()
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 360 bytes
    - Viewed (0)
  6. tests/test_tutorial/test_testing_dependencies/test_tutorial001_an.py

    from docs_src.dependency_testing.tutorial001_an import (
        app,
        client,
        test_override_in_items,
        test_override_in_items_with_params,
        test_override_in_items_with_q,
    )
    
    
    def test_override_in_items_run():
        test_override_in_items()
    
    
    def test_override_in_items_with_q_run():
        test_override_in_items_with_q()
    
    
    def test_override_in_items_with_params_run():
        test_override_in_items_with_params()
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 1.5K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_testing_dependencies/test_tutorial001_py310.py

    from ...utils import needs_py310
    
    
    @needs_py310
    def test_override_in_items_run():
        from docs_src.dependency_testing.tutorial001_py310 import test_override_in_items
    
        test_override_in_items()
    
    
    @needs_py310
    def test_override_in_items_with_q_run():
        from docs_src.dependency_testing.tutorial001_py310 import (
            test_override_in_items_with_q,
        )
    
        test_override_in_items_with_q()
    
    
    @needs_py310
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 2K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_testing/test_main_b_an.py

    from docs_src.app_testing.app_b_an import test_main
    
    
    def test_app():
        test_main.test_create_existing_item()
        test_main.test_create_item()
        test_main.test_create_item_bad_token()
        test_main.test_read_nonexistent_item()
        test_main.test_read_item()
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 303 bytes
    - Viewed (1)
  9. tests/test_tutorial/test_testing/test_tutorial001.py

    from docs_src.app_testing.tutorial001 import client, test_read_main
    
    
    def test_main():
        test_read_main()
    
    
    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"},
            "paths": {
                "/": {
                    "get": {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 821 bytes
    - Viewed (0)
  10. tests/test_request_body_parameters_media_type.py

    from fastapi.testclient import TestClient
    from pydantic import BaseModel
    
    app = FastAPI()
    
    media_type = "application/vnd.api+json"
    
    
    # NOTE: These are not valid JSON:API resources
    # but they are fine for testing requestBody with custom media_type
    class Product(BaseModel):
        name: str
        price: float
    
    
    class Shop(BaseModel):
        name: str
    
    
    @app.post("/products")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 6.4K bytes
    - Viewed (0)
Back to top