Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 18 for fileset (0.03 sec)

  1. tests/test_tutorial/test_request_files/test_tutorial002.py

        client = TestClient(app)
        with path.open("rb") as file, path2.open("rb") as file2:
            response = client.post(
                "/files/",
                files=(
                    ("files", ("test.txt", file)),
                    ("files", ("test2.txt", file2)),
                ),
            )
        assert response.status_code == 200, response.text
        assert response.json() == {"file_sizes": [14, 15]}
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 8.2K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_request_files/test_tutorial001.py

        }
    
    
    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:
            response = client.post("/files/", files={"file": file})
        assert response.status_code == 200, response.text
        assert response.json() == {"file_size": 14}
    
    
    def test_post_large_file(tmp_path, client: TestClient):
        default_pydantic_max_size = 2**16
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 7.1K bytes
    - Viewed (0)
  3. .pre-commit-config.yaml

            name: update languages
            entry: uv run ./scripts/docs.py update-languages
            files: ^docs/.*|scripts/docs\.py$
            pass_filenames: false
    
          - id: ensure-non-translated
            language: unsupported
            name: ensure non-translated files are not modified
            entry: uv run ./scripts/docs.py ensure-non-translated
            files: ^docs/(?!en/).*|^scripts/docs\.py$
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 11:36:58 UTC 2025
    - 1.8K bytes
    - Viewed (1)
  4. tests/test_request_params/test_file/test_optional.py

    @pytest.mark.parametrize(
        "path",
        [
            "/optional-bytes",
            "/optional-uploadfile",
        ],
    )
    def test_optional(path: str):
        client = TestClient(app)
        response = client.post(path, files=[("p", b"hello")])
        assert response.status_code == 200
        assert response.json() == {"file_size": 5}
    
    
    # =====================================================================================
    # Alias
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 9.7K bytes
    - Viewed (0)
  5. tests/test_request_params/test_file/test_optional_list.py

    @pytest.mark.parametrize(
        "path",
        [
            "/optional-list-bytes",
            "/optional-list-uploadfile",
        ],
    )
    def test_optional_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]}
    
    
    # =====================================================================================
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 10.4K bytes
    - Viewed (0)
  6. tests/test_request_params/test_file/test_list.py

    
    @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]}
    
    
    # =====================================================================================
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:31:34 UTC 2025
    - 11.2K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_request_files/test_tutorial001_02.py

            response = client.post("/files/", files={"file": file})
        assert response.status_code == 200, response.text
        assert response.json() == {"file_size": 14}
    
    
    def test_post_upload_file(tmp_path: Path, client: TestClient):
        path = tmp_path / "test.txt"
        path.write_bytes(b"<file content>")
    
        with path.open("rb") as file:
            response = client.post("/uploadfile/", files={"file": file})
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 7.4K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_request_forms_and_files/test_tutorial001.py

        path = tmp_path / "test.txt"
        path.write_bytes(b"<file content>")
    
        client = TestClient(app)
        with path.open("rb") as file:
            response = client.post("/files/", files={"file": file})
        assert response.status_code == 422, response.text
        assert response.json() == {
            "detail": [
                {
                    "type": "missing",
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 7.3K bytes
    - Viewed (0)
  9. tests/test_request_params/test_file/test_required.py

    @pytest.mark.parametrize(
        "path",
        [
            "/required-bytes",
            "/required-uploadfile",
        ],
    )
    def test_required(path: str):
        client = TestClient(app)
        response = client.post(path, files=[("p", b"hello")])
        assert response.status_code == 200
        assert response.json() == {"file_size": 5}
    
    
    # =====================================================================================
    # Alias
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 10.8K bytes
    - Viewed (0)
  10. .github/workflows/test.yml

          - name: Store coverage files
            if: matrix.coverage == 'coverage'
            uses: actions/upload-artifact@v5
            with:
              name: coverage-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/coverage/.coverage.*') }}
              path: coverage
              include-hidden-files: true
    
      coverage-combine:
        needs: [test]
        runs-on: ubuntu-latest
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 08:53:59 UTC 2025
    - 4.4K bytes
    - Viewed (0)
Back to top