Testing utilities for UploadKit.
Provides fake storage providers, in-memory upload files, and assertion helpers so packages and apps can test upload pipelines without real object storage.
Use this package in tests only.
Never ship this as runtime functionality in production.
Requires Python 3.10+.
pip install uploadkit-testingfrom uploadkit import Uploader, UploadPolicy
from uploadkit_testing import FakeStorageProvider, make_upload_file
storage = FakeStorageProvider()
uploader = Uploader(UploadPolicy(), storage)
result = uploader.upload(
make_upload_file(b"hello", name="hello.txt"),
bucket="test",
object_name="hello.txt",
)
assert result.etag == "fake-etag"Thin test doubles that satisfy UploadKit Core protocols. No production code paths.
| Symbol | Kind |
|---|---|
FakeStorageProvider |
Public |
MemoryUploadFile / make_upload_file |
Public |
assert_raises_uploader_error / assert_upload_fails |
Public |
Docker Compose harness for FastAPI upload performance (MinIO + curl smoke + k6 load) lives in perf/.
- How to run:
perf/README.md - Choosing chunk / part size and workers:
perf/CHUNK_SIZE_GUIDE.md
See CHANGELOG.md.
See CONTRIBUTING.md.