_algopy_testing.context_helpers.txn_context
¶
Module Contents¶
Classes¶
Context for managing transaction groups and active transactions. |
API¶
- class TransactionContext¶
Context for managing transaction groups and active transactions.
Initialization
- defer_app_call(
- method: collections.abc.Callable[_algopy_testing.context_helpers.txn_context.TParamSpec, _algopy_testing.context_helpers.txn_context.TReturn],
- *args: _algopy_testing.context_helpers.txn_context.TParamSpec,
- **kwargs: _algopy_testing.context_helpers.txn_context.TParamSpec,
Prepare an application call transaction group for a contract method without executing it.
- create_group(
- gtxns: Sequence[algopy.gtxn.TransactionBase | _algopy_testing.context_helpers.txn_context.DeferredAppCall[Any]] | None = None,
- active_txn_index: int | None = None,
- active_txn_overrides: _algopy_testing.models.txn_fields.ActiveTransactionFields | None = None,
Adds a new transaction group using a list of transactions and an optional index to indicate the active transaction within the group.
- Parameters:
gtxns – List of transactions
active_txn_index – Index of the active transaction
active_txn_overrides – Overrides for active txn
- Returns:
None