packages.valory.skills.abstract_
round_
abci.test_
tools.base
Tests for valory/abstract_round_abci skill's behaviours.
FSMBehaviourBaseCase Objects
class FSMBehaviourBaseCase(BaseSkillTestCase, ABC)
Base case for testing FSMBehaviour classes.
setup_
class
@classmethod
def setup_class(cls, **kwargs: Any) -> None
Setup the test class.
setup
def setup(**kwargs: Any) -> None
Set up the test method.
Called each time before a test method is called.
Arguments:
kwargs
: the keyword arguments passed to _prepare_skill
fast_
forward_
to_
behaviour
def fast_forward_to_behaviour(behaviour: AbstractRoundBehaviour,
behaviour_id: str,
synchronized_data: BaseSynchronizedData) -> None
Fast forward the FSM to a behaviour.
mock_
ledger_
api_
request
def mock_ledger_api_request(request_kwargs: Dict,
response_kwargs: Dict) -> None
Mock http request.
Arguments:
request_kwargs
: keyword arguments for request check.response_kwargs
: keyword arguments for mock response.
mock_
contract_
api_
request
def mock_contract_api_request(contract_id: str, request_kwargs: Dict,
response_kwargs: Dict) -> None
Mock http request.
Arguments:
contract_id
: contract id.request_kwargs
: keyword arguments for request check.response_kwargs
: keyword arguments for mock response.
mock_
http_
request
def mock_http_request(request_kwargs: Dict, response_kwargs: Dict) -> None
Mock http request.
Arguments:
request_kwargs
: keyword arguments for request check.response_kwargs
: keyword arguments for mock response.
mock_
signing_
request
def mock_signing_request(request_kwargs: Dict, response_kwargs: Dict) -> None
Mock signing request.
mock_
a2a_
transaction
def mock_a2a_transaction() -> None
Performs mock a2a transaction.
end_
round
def end_round(done_event: Enum) -> None
Ends round early to cover wait_for_end
generator.
teardown_
class
@classmethod
def teardown_class(cls) -> None
Teardown the test class.
teardown
def teardown(**kwargs: Any) -> None
Teardown.
DummyContext Objects
class DummyContext()
Dummy Context class for testing shared state initialization.
params Objects
class params()
Dummy param variable.
is_
abstract_
component
@property
def is_abstract_component() -> bool
Mock for is_abstract.