Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 41 for test_post (0.27 seconds)

  1. tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial006.py

    from fastapi.testclient import TestClient
    
    from docs_src.path_operation_advanced_configuration.tutorial006_py39 import app
    
    client = TestClient(app)
    
    
    def test_post():
        response = client.post("/items/", content=b"this is actually not validated")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "size": 30,
            "content": {
                "name": "Maaaagic",
                "price": 42,
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 1.9K bytes
    - Click Count (0)
  2. tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial007.py

        mod = importlib.import_module(
            f"docs_src.path_operation_advanced_configuration.{request.param}"
        )
    
        client = TestClient(mod.app)
        return client
    
    
    def test_post(client: TestClient):
        yaml_data = """
            name: Deadpoolio
            tags:
            - x-force
            - x-men
            - x-avengers
            """
        response = client.post("/items/", content=yaml_data)
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Dec 20 15:55:38 GMT 2025
    - 3.4K bytes
    - Click Count (0)
  3. tests/test_tutorial/test_handling_errors/test_tutorial005.py

                    "input": "XL",
                }
            ],
            "body": {"title": "towel", "size": "XL"},
        }
    
    
    def test_post():
        data = {"title": "towel", "size": 5}
        response = client.post("/items/", json=data)
        assert response.status_code == 200, response.text
        assert response.json() == data
    
    
    def test_openapi_schema():
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Dec 27 18:19:10 GMT 2025
    - 3.9K bytes
    - Click Count (0)
  4. tests/test_modules_same_name_body/test_main.py

    import pytest
    from fastapi.testclient import TestClient
    
    from .app.main import app
    
    client = TestClient(app)
    
    
    @pytest.mark.parametrize(
        "path", ["/a/compute", "/a/compute/", "/b/compute", "/b/compute/"]
    )
    def test_post(path):
        data = {"a": 2, "b": "foo"}
        response = client.post(path, json=data)
        assert response.status_code == 200, response.text
        assert data == response.json()
    
    
    @pytest.mark.parametrize(
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Thu Feb 27 14:42:41 GMT 2025
    - 5.5K bytes
    - Click Count (0)
  5. tests/test_tutorial/test_extra_models/test_tutorial001_tutorial002.py

        ],
    )
    def get_client(request: pytest.FixtureRequest):
        mod = importlib.import_module(f"docs_src.extra_models.{request.param}")
    
        client = TestClient(mod.app)
        return client
    
    
    def test_post(client: TestClient):
        response = client.post(
            "/user/",
            json={
                "username": "johndoe",
                "password": "secret",
                "email": "******@****.***",
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Fri Dec 26 10:43:02 GMT 2025
    - 5.5K bytes
    - Click Count (0)
  6. tests/test_request_params/test_file/test_list.py

                    "input": None,
                }
            ]
        }
    
    
    @pytest.mark.parametrize(
        "path",
        [
            "/list-bytes",
            "/list-uploadfile",
        ],
    )
    def test_list(path: str):
        client = TestClient(app)
        response = client.post(path, files=[("p", b"hello"), ("p", b"world")])
        assert response.status_code == 200
        assert response.json() == {"file_size": [5, 5]}
    
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Dec 27 18:31:34 GMT 2025
    - 11.2K bytes
    - Click Count (0)
  7. src/test/java/jcifs/netbios/LmhostsTest.java

                writer.write("192.168.1.100 TESTHOST\n");
                writer.write("10.0.0.1      SERVER01\n");
            }
    
            when(mockConfig.getLmHostsFileName()).thenReturn(lmhostsFile.getAbsolutePath());
    
            // Test first host
            NbtAddress result = lmhosts.getByName("TESTHOST", mockContext);
            assertNotNull(result);
            assertEquals("TESTHOST", result.getHostName());
    
            // Test second host
    Created: Sat Dec 20 13:44:44 GMT 2025
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 18.2K bytes
    - Click Count (0)
  8. tests/test_request_params/test_query/test_list.py

    Sebastián Ramírez <******@****.***> 1766860294 -0800
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Dec 27 18:31:34 GMT 2025
    - 10.9K bytes
    - Click Count (0)
  9. tests/test_request_params/test_path/test_list.py

    Motov Yurii <******@****.***> 1765469736 +0100
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Thu Dec 11 16:15:36 GMT 2025
    - 63 bytes
    - Click Count (0)
  10. src/test/java/jcifs/SmbTransportPoolTest.java

                // When
                SmbTransport result = transportPool.getSmbTransport(context, TEST_HOST, DEFAULT_PORT, false, false);
    
                // Then
                assertNotNull(result);
                assertEquals(transport, result);
                verify(transportPool).getSmbTransport(context, TEST_HOST, DEFAULT_PORT, false, false);
            }
    
    Created: Sat Dec 20 13:44:44 GMT 2025
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 22.6K bytes
    - Click Count (0)
Back to Top