Test implementations.
Classes
|
Dummy |
|
Dummy |
Bases: Mapper[ValueType, ValueType, ContextType]
Dummy Mapper implementation.
Map values to themselves, unless override_function is given.
Bases: Fetcher[SourceType, IdType]
Dummy Fetcher implementation.
A “happy path” fetcher implementation for testing purposes. Returns generated names for all IDs and placeholders, so translation retrieval will never fail when using this fetcher.
Flag indicating whether the fetch_all() operation is permitted.
Source names known to the Fetcher, such as cities or languages.
Placeholders for sources managed by the Fetcher.
A dict {source: [placeholders..]}.
Notes
Placeholders (and sources) are returned as they appear as they are known to the fetcher (without mapping).
Return generated translations for all IDs and placeholders.
Fetch as much data as possible.
placeholders – All desired placeholders in preferred order.
required – Placeholders that must be included in the response.
A mapping {source: PlaceholderTranslations} for translation.
ForbiddenOperationError – If fetching all IDs is not possible or permitted.
UnknownPlaceholderError – For placeholder(s) that are unknown to the Fetcher.
ImplementationError – For errors made by the inheriting implementation.