Skip to content

packages.valory.skills.abstract_round_abci.test_tools.base

Tests for valory/abstract_round_abci skill's behaviours.

FSMBehaviourBaseCase Objects

class FSMBehaviourBaseCase(BaseSkillTestCase)

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() -> 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.

Back to top