Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 16 for sida (0.14 sec)

  1. tests/test_tutorial/test_sql_databases/test_sql_databases.py

            test_db.unlink()
        # Import while creating the client to create the DB after starting the test session
        from docs_src.sql_databases.sql_app import main
    
        # Ensure import side effects are re-executed
        importlib.reload(main)
        with TestClient(main.app) as c:
            yield c
        if test_db.is_file():  # pragma: nocover
            test_db.unlink()
        os.chdir(cwd)
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 16.1K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_sql_databases/test_sql_databases_middleware_py310.py

            test_db.unlink()
        # Import while creating the client to create the DB after starting the test session
        from docs_src.sql_databases.sql_app_py310 import alt_main
    
        # Ensure import side effects are re-executed
        importlib.reload(alt_main)
    
        with TestClient(alt_main.app) as c:
            yield c
        if test_db.is_file():  # pragma: nocover
            test_db.unlink()
        os.chdir(cwd)
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 16.5K bytes
    - Viewed (0)
  3. docs_src/response_cookies/tutorial001.py

    from fastapi import FastAPI
    from fastapi.responses import JSONResponse
    
    app = FastAPI()
    
    
    @app.post("/cookie/")
    def create_cookie():
        content = {"message": "Come to the dark side, we have cookies"}
        response = JSONResponse(content=content)
        response.set_cookie(key="fakesession", value="fake-cookie-session-value")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Mar 26 19:09:53 GMT 2020
    - 344 bytes
    - Viewed (0)
  4. tests/test_tutorial/test_sql_databases/test_testing_databases_py39.py

            test_db.unlink()
        # Import while creating the client to create the DB after starting the test session
        from docs_src.sql_databases.sql_app_py39.tests import test_sql_app
    
        # Ensure import side effects are re-executed
        importlib.reload(test_sql_app)
        test_sql_app.test_create_user()
        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
    - 822 bytes
    - Viewed (0)
  5. tests/test_tutorial/test_sql_databases/test_sql_databases_middleware_py39.py

            test_db.unlink()
        # Import while creating the client to create the DB after starting the test session
        from docs_src.sql_databases.sql_app_py39 import alt_main
    
        # Ensure import side effects are re-executed
        importlib.reload(alt_main)
    
        with TestClient(alt_main.app) as c:
            yield c
        if test_db.is_file():  # pragma: nocover
            test_db.unlink()
        os.chdir(cwd)
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 16.5K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_sql_databases/test_sql_databases_py310.py

            test_db.unlink()
        # Import while creating the client to create the DB after starting the test session
        from docs_src.sql_databases.sql_app_py310 import main
    
        # Ensure import side effects are re-executed
        importlib.reload(main)
        with TestClient(main.app) as c:
            yield c
        if test_db.is_file():  # pragma: nocover
            test_db.unlink()
        os.chdir(cwd)
    
    
    @needs_py310
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 16.5K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_sql_databases/test_sql_databases_py39.py

            test_db.unlink()
        # Import while creating the client to create the DB after starting the test session
        from docs_src.sql_databases.sql_app_py39 import main
    
        # Ensure import side effects are re-executed
        importlib.reload(main)
        with TestClient(main.app) as c:
            yield c
        if test_db.is_file():  # pragma: nocover
            test_db.unlink()
        os.chdir(cwd)
    
    
    @needs_py39
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 16.5K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_body/test_tutorial001.py

                        "type": "type_error.dict",
                    }
                ]
            }
        )
    
    
    def test_other_exceptions(client: TestClient):
        with patch("json.loads", side_effect=Exception):
            response = client.post("/items/", json={"test": "test2"})
            assert response.status_code == 400, response.text
    
    
    def test_openapi_schema(client: TestClient):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 14.7K bytes
    - Viewed (4)
  9. tests/test_tutorial/test_body/test_tutorial001_py310.py

                        "type": "type_error.dict",
                    }
                ]
            }
        )
    
    
    @needs_py310
    def test_other_exceptions(client: TestClient):
        with patch("json.loads", side_effect=Exception):
            response = client.post("/items/", json={"test": "test2"})
            assert response.status_code == 400, response.text
    
    
    @needs_py310
    def test_openapi_schema(client: TestClient):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 15K bytes
    - Viewed (1)
  10. tests/test_tutorial/test_response_cookies/test_tutorial002.py

    client = TestClient(app)
    
    
    def test_path_operation():
        response = client.post("/cookie-and-object/")
        assert response.status_code == 200, response.text
        assert response.json() == {"message": "Come to the dark side, we have cookies"}
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Jul 09 18:06:12 GMT 2020
    - 414 bytes
    - Viewed (0)
Back to top