test_dynamo_shape
¶
Contract test: a mock Dynamo-style handler wraps FastVideo's public API without touching any private module.
The Dynamo backend package (components/src/dynamo/fastvideo/ in the
Dynamo repo) imports only these symbols:
from fastvideo import VideoGenerator
from fastvideo.api import (
ContinuationState, GenerationRequest, InputConfig, OutputConfig,
SamplingConfig,
)
If a FastVideo refactor breaks the adapter shape this test fails at FastVideo CI — before the Dynamo-side integration knows. The plan (PR 7.10) requires the backend to be expressible without flat legacy LTX-2 kwargs or FastVideo-internal imports; this file asserts the subset that exists today and is stable.
Classes¶
fastvideo.tests.contract.test_dynamo_shape.TestDynamoHandlerContract
¶
Functions¶
fastvideo.tests.contract.test_dynamo_shape.TestDynamoHandlerContract.test_handler_serializes_state_back_to_nvext
¶
When the request carries state, the handler should be able to include a matching serialized state on the response. (Dynamo's NvVideosResponse has nvext.continuation_state reserved for this in the pending disaggregation path.)
Source code in fastvideo/tests/contract/test_dynamo_shape.py
fastvideo.tests.contract.test_dynamo_shape.TestNoInternalImports
¶
The adapter template in this file imports only the public surface.
Any change to FastVideo that requires the Dynamo adapter to reach into a private module would make this test fail at review time.
Functions¶
fastvideo.tests.contract.test_dynamo_shape.nv_request_to_generation_request
¶
Translate Dynamo's request shape into FastVideo's typed request.
This function is the template integrators copy into the Dynamo repo. It uses only public FastVideo symbols.