Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 85 for test_app (0.17 sec)

  1. docs_src/settings/app02_an/test_main.py

    client = TestClient(app)
    
    
    def get_settings_override():
        return Settings(admin_email="******@****.***")
    
    
    app.dependency_overrides[get_settings] = get_settings_override
    
    
    def test_app():
        response = client.get("/info")
        data = response.json()
        assert data == {
            "app_name": "Awesome API",
            "admin_email": "******@****.***",
            "items_per_user": 50,
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 515 bytes
    - Viewed (0)
  2. docs_src/settings/app02_an_py39/test_main.py

    client = TestClient(app)
    
    
    def get_settings_override():
        return Settings(admin_email="******@****.***")
    
    
    app.dependency_overrides[get_settings] = get_settings_override
    
    
    def test_app():
        response = client.get("/info")
        data = response.json()
        assert data == {
            "app_name": "Awesome API",
            "admin_email": "******@****.***",
            "items_per_user": 50,
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 515 bytes
    - Viewed (0)
  3. docs_src/settings/app02/test_main.py

    client = TestClient(app)
    
    
    def get_settings_override():
        return Settings(admin_email="******@****.***")
    
    
    app.dependency_overrides[get_settings] = get_settings_override
    
    
    def test_app():
        response = client.get("/info")
        data = response.json()
        assert data == {
            "app_name": "Awesome API",
            "admin_email": "******@****.***",
            "items_per_user": 50,
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Jul 29 09:26:07 UTC 2021
    - 515 bytes
    - Viewed (0)
  4. platforms/native/language-native/src/test/groovy/org/gradle/language/swift/plugins/SwiftBasePluginTest.groovy

            def executableFile = project.objects.fileProperty()
            executable.name >> name
            executable.names >> Names.of(name)
            executable.module >> Providers.of("TestApp")
            executable.baseName >> Providers.of("test_app")
            executable.executableFile >> executableFile
            executable.targetMachine >> Stub(SwiftPlatform)
            executable.sourceCompatibility >> project.objects.property(SwiftVersion)
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Nov 16 20:20:03 UTC 2023
    - 7.5K bytes
    - Viewed (0)
  5. src/test/java/org/codelibs/fess/unit/UnitFessTestCase.java

    import org.dbflute.utflute.lastaflute.WebContainerTestCase;
    
    public abstract class UnitFessTestCase extends WebContainerTestCase {
        @Override
        protected String prepareConfigFile() {
            return "test_app.xml";
        }
    
        @Override
        public void tearDown() throws Exception {
            ComponentUtil.setFessConfig(null);
            super.tearDown();
        }
    Registered: Wed Jun 12 13:08:18 UTC 2024
    - Last Modified: Thu Feb 22 01:37:57 UTC 2024
    - 1K bytes
    - Viewed (0)
  6. tests/test_openapi_servers.py

            },
            {"url": "https://prod.example.com"},
        ]
    )
    
    
    @app.get("/foo")
    def foo():
        return {"message": "Hello World"}
    
    
    client = TestClient(app)
    
    
    def test_app():
        response = client.get("/foo")
        assert response.status_code == 200, response.text
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 2K bytes
    - Viewed (0)
  7. platforms/native/language-native/src/test/groovy/org/gradle/language/cpp/plugins/CppBasePluginTest.groovy

            "testDebug" | "compileTestDebugCpp" | "test/debug"
        }
    
        def "adds link and install task for executable"() {
            def baseName = project.objects.property(String)
            baseName.set("test_app")
            def executable = Stub(DefaultCppExecutable)
            def executableFile = project.objects.fileProperty()
            executable.name >> name
            executable.names >> Names.of(name)
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Nov 16 20:20:03 UTC 2023
    - 6.9K bytes
    - Viewed (0)
  8. tests/test_default_response_class_router.py

    )
    
    
    client = TestClient(app)
    
    json_type = "application/json"
    text_type = "text/plain; charset=utf-8"
    html_type = "text/html; charset=utf-8"
    override_type = "application/x-override"
    
    
    def test_app():
        with client:
            response = client.get("/")
        assert response.json() == {"msg": "Hello World"}
        assert response.headers["content-type"] == json_type
    
    
    def test_app_override():
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sun Mar 01 20:49:20 UTC 2020
    - 5K bytes
    - Viewed (0)
  9. tests/test_default_response_class.py

    
    client = TestClient(app)
    
    orjson_type = "application/x-orjson"
    text_type = "text/plain; charset=utf-8"
    html_type = "text/html; charset=utf-8"
    override_type = "application/x-override"
    
    
    def test_app():
        with client:
            response = client.get("/")
        assert response.json() == {"msg": "Hello World"}
        assert response.headers["content-type"] == orjson_type
    
    
    def test_app_override():
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sun Mar 01 20:49:20 UTC 2020
    - 5.2K bytes
    - Viewed (0)
  10. tests/test_ws_router.py

        app.include_router(router)
        app.include_router(prefix_router, prefix="/prefix")
        app.include_router(native_prefix_route)
        return app
    
    
    app = make_app(app)
    
    
    def test_app():
        client = TestClient(app)
        with client.websocket_connect("/") as websocket:
            data = websocket.receive_text()
            assert data == "Hello, world!"
    
    
    def test_router():
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sun Jun 11 19:08:14 UTC 2023
    - 7.5K bytes
    - Viewed (0)
Back to top