def test_validate_plugins(self): data = """ baking_address: tz1g8vkmcde6sWKaG2NN9WKzCkDM6Rziq194 plugins: enabled: - plug1 - plug2 """ block_api = RpcBlockApiImpl(network, self.mainnet_public_node_url) cnf_prsr = BakingYamlConfParser( data, clnt_mngr=None, provider_factory=None, network_config=None, node_url="", block_api=block_api, ) cnf_prsr.parse() cnf_prsr.validate_plugins(cnf_prsr.get_conf_obj()) plugins = cnf_prsr.get_conf_obj_attr("plugins") self.assertIsInstance(plugins, dict) self.assertIsInstance(plugins["enabled"], list) self.assertEqual(len(plugins["enabled"]), 2)
def test_validate_plugins(self): data = """ baking_address: tz1Z1tMai15JWUWeN2PKL9faXXVPMuWamzJj plugins: enabled: """ block_api = RpcBlockApiImpl(network, self.mainnet_public_node_url) cnf_prsr = BakingYamlConfParser(data, wllt_clnt_mngr=None, provider_factory=None, network_config=None, node_url="", block_api=block_api) cnf_prsr.parse() cnf_prsr.validate_plugins(cnf_prsr.get_conf_obj())
def test_validate_plugins(self): data = """ baking_address: tz1Z1tMai15JWUWeN2PKL9faXXVPMuWamzJj plugins: enabled: - plug1 - plug2 """ block_api = RpcBlockApiImpl(network, self.mainnet_public_node_url) cnf_prsr = BakingYamlConfParser(data, clnt_mngr=None, provider_factory=None, network_config=None, node_url="", block_api=block_api) cnf_prsr.parse() cnf_prsr.validate_plugins(cnf_prsr.get_conf_obj()) plugins = cnf_prsr.get_conf_obj_attr('plugins') self.assertIsInstance(plugins, dict) self.assertIsInstance(plugins['enabled'], list) self.assertEqual(len(plugins['enabled']), 2)