Skip to content

packages.valory.skills.abstract_round_abci.tests.test_io.test_load

Tests for the loading functionality of abstract round abci.

TestLoader Objects

class TestLoader()

Tests for the Loader.

setup_method

def setup_method() -> None

Setup the tests.

test__get_loader_from_filetype

@staticmethod
@pytest.mark.parametrize(
    "filetype, custom_loader, expected_loader",
    (
        (None, None, None),
        (SupportedFiletype.JSON, None, JSONLoader.load_single_object),
        (
            SupportedFiletype.JSON,
            __dummy_custom_loader,
            JSONLoader.load_single_object,
        ),
        (None, __dummy_custom_loader, __dummy_custom_loader),
    ),
)
def test__get_loader_from_filetype(
        filetype: Optional[SupportedFiletype], custom_loader: CustomLoaderType,
        expected_loader: Optional[SupportedLoaderType]) -> None

Test _get_loader_from_filetype.

test_load

def test_load() -> None

Test load.

test_no_object

def test_no_object() -> None

Test load throws error when no object is provided.

test_load_multiple_objects

def test_load_multiple_objects() -> None

Test load when multiple objects are to be deserialized.