controller_test
Automated controller testing.
ControllerTest ¶
ControllerTest(
client,
base_path,
collection,
raw_collection,
service_type,
monkeypatch,
collection_filters=None,
)
Standard controller testing utility.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
client |
TestClient
|
Test client instance. |
required |
base_path |
str
|
Path for POST and collection GET requests. |
required |
collection |
Sequence[orm.Base]
|
Collection of domain objects. |
required |
raw_collection |
Sequence[dict[str, Any]]
|
Collection of raw representations of domain objects. |
required |
service_type |
type[Service]
|
The domain Service object type. |
required |
monkeypatch |
MonkeyPatch
|
Pytest's monkeypatch. |
required |
collection_filters |
dict[str, Any] | None
|
Collection filters for GET collection request. |
None
|