reviewboard.testing.queries.base¶
Base patterns and support for defining expected queries for unit tests.
New in version 5.0.7.
- class ExpectedQResult[source]¶
Bases:
TypedDict
An expected Q-expression result from a utility function.
This should be used by unit test utility functions that build expected Q expressions in order to provide consistent results with typing.
New in version 5.0.7.
- q: Q¶
The expected Q expression.
- prep_equeries: NotRequired[ExpectedQueries]¶
Any queries that should be expected before a query using this Q.
- subqueries: NotRequired[ExpectedQueries]¶
Any subqueries that are generated by this Q-expression.
- __annotations__ = {'join_types': ForwardRef('NotRequired[Dict[str, str]]', module='reviewboard.testing.queries.base'), 'prep_equeries': ForwardRef('NotRequired[ExpectedQueries]', module='reviewboard.testing.queries.base'), 'q': ForwardRef('Q', module='reviewboard.testing.queries.base'), 'subqueries': ForwardRef('NotRequired[ExpectedQueries]', module='reviewboard.testing.queries.base'), 'tables': ForwardRef('Set[str]', module='reviewboard.testing.queries.base')}¶
- __closed__ = False¶
- __extra_items__ = None¶
- __mutable_keys__ = frozenset({'join_types', 'prep_equeries', 'q', 'subqueries', 'tables'})¶
- __optional_keys__ = frozenset({})¶
- __orig_bases__ = (<function TypedDict>,)¶
- __readonly_keys__ = frozenset({})¶
- __required_keys__ = frozenset({'join_types', 'prep_equeries', 'q', 'subqueries', 'tables'})¶
- __total__ = True¶