def _validate_config(ctx: Context) -> None: """ Validate agent config. :param ctx: Context object. :return: None :raises ClickException: if validation is failed. """ try: validate_item_config("agent", Path(ctx.cwd)) except AEAConfigException as e: # pragma: no cover raise click.ClickException( "Failed to validate agent config. {}".format(str(e)))
def test_validate_item_config_negative(self, *mocks): """Test validate_item_config for negative result.""" with self.assertRaises(AEAConfigException): validate_item_config(item_type="agent", package_path="file/path")
def test_validate_item_config_positive(self, *mocks): """Test validate_item_config for positive result.""" validate_item_config(item_type="agent", package_path="file/path")