Ejemplo n.º 1
0
def test_list(config, owned_pkg, wallet_pkg, caplog):
    install_package(owned_pkg, config)
    install_package(wallet_pkg, config)

    with caplog.at_level(logging.INFO):
        list_installed_packages(config)
        assert (f"owned==1.0.0 --- ({OWNED_MANIFEST_IPFS_URI})\n"
                in caplog.text)  # noqa: E501
        assert (f"wallet==1.0.0 --- ({WALLET_MANIFEST_IPFS_URI})\n"
                in caplog.text)  # noqa: E501
        assert (
            "- safe-math-lib==1.0.0 --- (ipfs://QmWnPsiS3Xb8GvCDEBFnnKs8Yk4HaAX6rCqJAaQXGbCoPk)\n"
            in caplog.text)  # noqa: E501
        assert (f"- owned==1.0.0 --- ({OWNED_MANIFEST_IPFS_URI})\n"
                in caplog.text)  # noqa: E501
Ejemplo n.º 2
0
def test_list(config, owned_pkg, wallet_pkg, caplog):
    install_package(owned_pkg, config)
    install_package(wallet_pkg, config)

    with caplog.at_level(logging.INFO):
        list_installed_packages(config)
        assert (
            "owned==1.0.0 --- (ipfs://QmbeVyFLSuEUxiXKwSsEjef6icpdTdA4kGG9BcrJXKNKUW)\n"
            in caplog.text)  # noqa: E501
        assert (
            "wallet==1.0.0 --- (ipfs://QmRMSm4k37mr2T3A2MGxAj2eAHGR5veibVt1t9Leh5waV1)\n"
            in caplog.text)  # noqa: E501
        assert (
            "- safe-math-lib==1.0.0 --- (ipfs://QmWgvM8yXGyHoGWqLFXvareJsoCZVsdrpKNCLMun3RaSJm)\n"
            in caplog.text)  # noqa: E501
        assert (
            "- owned==1.0.0 --- (ipfs://QmbeVyFLSuEUxiXKwSsEjef6icpdTdA4kGG9BcrJXKNKUW)\n"
            in caplog.text)  # noqa: E501
Ejemplo n.º 3
0
def list_action(args: argparse.Namespace) -> None:
    config = Config(args)
    list_installed_packages(config)