Search Options

Results per page
Sort
Preferred Languages
Advance

Results 201 - 210 of 294 for ptrtest (0.05 sec)

  1. tests/test_tutorial/test_request_files/test_tutorial001_02_an_py310.py

    from pathlib import Path
    
    import pytest
    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py310
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.request_files.tutorial001_02_an_py310 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_py310
    def test_post_form_no_body(client: TestClient):
        response = client.post("/files/")
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 8.5K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_separate_openapi_schemas/test_tutorial002_py39.py

    import pytest
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py39, needs_pydanticv2
    
    
    @pytest.fixture(name="client")
    def get_client() -> TestClient:
        from docs_src.separate_openapi_schemas.tutorial002_py39 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_py39
    def test_create_item(client: TestClient) -> None:
        response = client.post("/items/", json={"name": "Foo"})
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Aug 25 19:10:22 UTC 2023
    - 4.9K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_request_forms_and_files/test_tutorial001.py

    import pytest
    from dirty_equals import IsDict
    from fastapi import FastAPI
    from fastapi.testclient import TestClient
    
    
    @pytest.fixture(name="app")
    def get_app():
        from docs_src.request_forms_and_files.tutorial001 import app
    
        return app
    
    
    @pytest.fixture(name="client")
    def get_client(app: FastAPI):
        client = TestClient(app)
        return client
    
    
    def test_post_form_no_body(client: TestClient):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 9.8K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_request_forms_and_files/test_tutorial001_an_py39.py

    import pytest
    from dirty_equals import IsDict
    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_forms_and_files.tutorial001_an_py39 import app
    
        return app
    
    
    @pytest.fixture(name="client")
    def get_client(app: FastAPI):
        client = TestClient(app)
        return client
    
    
    @needs_py39
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_body_multiple_params/test_tutorial001_an.py

    import pytest
    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.body_multiple_params.tutorial001_an import app
    
        client = TestClient(app)
        return client
    
    
    def test_post_body_q_bar_content(client: TestClient):
        response = client.put("/items/5?q=bar", json={"name": "Foo", "price": 50.5})
        assert response.status_code == 200
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_request_files/test_tutorial001_an_py39.py

    import pytest
    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py39
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.request_files.tutorial001_an_py39 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_py39
    def test_post_form_no_body(client: TestClient):
        response = client.post("/files/")
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 7.7K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_request_form_models/test_tutorial001_an_py39.py

    import pytest
    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    from tests.utils import needs_py39
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.request_form_models.tutorial001_an_py39 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_py39
    def test_post_body_form(client: TestClient):
        response = client.post("/login/", data={"username": "Foo", "password": "secret"})
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Sep 05 15:16:50 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  8. compat/maven-model-builder/src/test/java/org/apache/maven/model/building/FileModelSourceTest.java

     *
     */
    class FileModelSourceTest {
    
        /**
         * Test of equals method, of class FileModelSource.
         */
        @Test
        void testEquals() throws Exception {
            File tempFile = createTempFile("pomTest");
            FileModelSource instance = new FileModelSource(tempFile);
    
            assertFalse(instance.equals(null));
            assertFalse(instance.equals(new Object()));
            assertTrue(instance.equals(instance));
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_response_model/test_tutorial003_01_py310.py

    import pytest
    from dirty_equals import IsDict, IsOneOf
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py310
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.response_model.tutorial003_01_py310 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_py310
    def test_post_user(client: TestClient):
        response = client.post(
            "/user/",
            json={
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Aug 04 20:47:07 UTC 2023
    - 5.8K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_request_files/test_tutorial001_03_an_py39.py

    import pytest
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py39
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.request_files.tutorial001_03_an_py39 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_py39
    def test_post_file(tmp_path, client: TestClient):
        path = tmp_path / "test.txt"
        path.write_bytes(b"<file content>")
    
        with path.open("rb") as file:
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 6.2K bytes
    - Viewed (0)
Back to top