Skip to content

packages.valory.skills.abstract_round_abci.test_tools.common

Test common classes.

CommonBaseCase Objects

class CommonBaseCase(FSMBehaviourBaseCase)

Base case for testing PriceEstimation FSMBehaviour.

BaseRandomnessBehaviourTest Objects

class BaseRandomnessBehaviourTest(CommonBaseCase)

Test RandomnessBehaviour.

test_randomness_behaviour

def test_randomness_behaviour() -> None

Test RandomnessBehaviour.

test_invalid_drand_value

def test_invalid_drand_value() -> None

Test invalid drand values.

test_invalid_response

def test_invalid_response() -> None

Test invalid json response.

test_max_retries_reached_fallback

def test_max_retries_reached_fallback() -> None

Test with max retries reached.

test_max_retries_reached_fallback_fail

def test_max_retries_reached_fallback_fail() -> None

Test with max retries reached.

test_max_retries_reached_fallback_fail_case_2

def test_max_retries_reached_fallback_fail_case_2() -> None

Test with max retries reached.

test_clean_up

def test_clean_up() -> None

Test when observed value is none.

BaseSelectKeeperBehaviourTest Objects

class BaseSelectKeeperBehaviourTest(CommonBaseCase)

Test SelectKeeperBehaviour.

test_select_keeper

@mock.patch.object(SkillContext, "agent_address", new_callable=mock.PropertyMock)
@pytest.mark.parametrize(
        "blacklisted_keepers",
        (
            set(),
            {"a_1"},
            {"test_agent_address" + "t" * 24},
            {"a_1" + "t" * 39, "a_2" + "t" * 39, "test_agent_address" + "t" * 24},
        ),
    )
def test_select_keeper(agent_address_mock: mock.Mock, blacklisted_keepers: Set[str]) -> None

Test select keeper agent.

test_select_keeper_preexisting_keeper

def test_select_keeper_preexisting_keeper() -> None

Test select keeper agent.

Back to top