assert_request_is_empty¶
yohou.testing.metadata_routing.assert_request_is_empty(metadata_request, exclude=None)
¶
Check if a metadata request dict is empty.
One can exclude a method or a list of methods from the check using the
exclude parameter. If metadata_request is a MetadataRouter, then
exclude can be of the form {"object" : [method, ...]}.
Parameters¶
| Name | Type | Description | Default |
|---|---|---|---|
metadata_request
|
MetadataRequest | MetadataRouter
|
The request object to check |
required |
exclude
|
str | list[str] | dict
|
Methods or objects to exclude from the check |
None
|
Raises¶
| Type | Description |
|---|---|
AssertionError
|
If metadata request is not empty |