Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 91 for get_app (0.21 sec)

  1. tests/test_openapi_separate_input_output_schemas.py

                ),
                Item(name="Plumbus"),
            ]
    
        client = TestClient(app)
        return client
    
    
    def test_create_item():
        client = get_app_client()
        client_no = get_app_client(separate_input_output_schemas=False)
        response = client.post("/items/", json={"name": "Plumbus"})
        response2 = client_no.post("/items/", json={"name": "Plumbus"})
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Sep 28 04:14:40 GMT 2023
    - 18.4K bytes
    - Viewed (2)
  2. tests/test_tutorial/test_events/test_tutorial002.py

    import pytest
    from fastapi import FastAPI
    from fastapi.testclient import TestClient
    
    
    @pytest.fixture(name="app", scope="module")
    def get_app():
        with pytest.warns(DeprecationWarning):
            from docs_src.events.tutorial002 import app
        yield app
    
    
    def test_events(app: FastAPI):
        with TestClient(app) as client:
            response = client.get("/items/")
            assert response.status_code == 200, response.text
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Oct 18 12:36:40 GMT 2023
    - 1.4K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_websockets/test_tutorial003_py39.py

    import pytest
    from fastapi import FastAPI
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py39
    
    
    @pytest.fixture(name="app")
    def get_app():
        from docs_src.websockets.tutorial003_py39 import app
    
        return app
    
    
    @pytest.fixture(name="html")
    def get_html():
        from docs_src.websockets.tutorial003_py39 import html
    
        return html
    
    
    @pytest.fixture(name="client")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 1.3K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_websockets/test_tutorial002_py310.py

    import pytest
    from fastapi import FastAPI
    from fastapi.testclient import TestClient
    from fastapi.websockets import WebSocketDisconnect
    
    from ...utils import needs_py310
    
    
    @pytest.fixture(name="app")
    def get_app():
        from docs_src.websockets.tutorial002_py310 import app
    
        return app
    
    
    @needs_py310
    def test_main(app: FastAPI):
        client = TestClient(app)
        response = client.get("/")
    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)
  5. tests/test_tutorial/test_events/test_tutorial001.py

    import pytest
    from fastapi import FastAPI
    from fastapi.testclient import TestClient
    
    
    @pytest.fixture(name="app", scope="module")
    def get_app():
        with pytest.warns(DeprecationWarning):
            from docs_src.events.tutorial001 import app
        yield app
    
    
    def test_events(app: FastAPI):
        with TestClient(app) as client:
            response = client.get("/items/foo")
            assert response.status_code == 200, response.text
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Oct 18 12:36:40 GMT 2023
    - 3.6K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_async_sql_databases/test_tutorial001.py

    import pytest
    from fastapi import FastAPI
    from fastapi.testclient import TestClient
    
    from ...utils import needs_pydanticv1
    
    
    @pytest.fixture(name="app", scope="module")
    def get_app():
        with pytest.warns(DeprecationWarning):
            from docs_src.async_sql_databases.tutorial001 import app
        yield app
    
    
    # TODO: pv2 add version with Pydantic v2
    @needs_pydanticv1
    def test_create_read(app: FastAPI):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Oct 18 12:36:40 GMT 2023
    - 6K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_websockets/test_tutorial002_an_py39.py

    import pytest
    from fastapi import FastAPI
    from fastapi.testclient import TestClient
    from fastapi.websockets import WebSocketDisconnect
    
    from ...utils import needs_py39
    
    
    @pytest.fixture(name="app")
    def get_app():
        from docs_src.websockets.tutorial002_an_py39 import app
    
        return app
    
    
    @needs_py39
    def test_main(app: FastAPI):
        client = TestClient(app)
        response = client.get("/")
    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)
  8. tests/test_tutorial/test_websockets/test_tutorial002_an_py310.py

    import pytest
    from fastapi import FastAPI
    from fastapi.testclient import TestClient
    from fastapi.websockets import WebSocketDisconnect
    
    from ...utils import needs_py310
    
    
    @pytest.fixture(name="app")
    def get_app():
        from docs_src.websockets.tutorial002_an_py310 import app
    
        return app
    
    
    @needs_py310
    def test_main(app: FastAPI):
        client = TestClient(app)
        response = client.get("/")
    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)
  9. tests/test_tutorial/test_request_files/test_tutorial003_an_py39.py

    import pytest
    from fastapi import FastAPI
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py39
    
    
    @pytest.fixture(name="app")
    def get_app():
        from docs_src.request_files.tutorial003_an_py39 import app
    
        return app
    
    
    @pytest.fixture(name="client")
    def get_client(app: FastAPI):
        client = TestClient(app)
        return client
    
    
    file_required = {
        "detail": [
            {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 7.6K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_request_files/test_tutorial003_py39.py

    import pytest
    from fastapi import FastAPI
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py39
    
    
    @pytest.fixture(name="app")
    def get_app():
        from docs_src.request_files.tutorial003_py39 import app
    
        return app
    
    
    @pytest.fixture(name="client")
    def get_client(app: FastAPI):
        client = TestClient(app)
        return client
    
    
    file_required = {
        "detail": [
            {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 7.6K bytes
    - Viewed (0)
Back to top