🐛 fix(custom_component.py): rename build_template_config method to template_config for better naming consistency

🔧 chore(test_custom_component.py): update test_custom_component_build_template_config to use the renamed template_config property
This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-12-11 12:32:02 -03:00
commit a0377c0ac7
2 changed files with 4 additions and 1 deletions

View file

@ -165,6 +165,9 @@ class CustomComponent(Component):
return next(iter(classes), "")
@property
def template_config(self):
return self.build_template_config()
def build_template_config(self):
if not self.code:
return {}

View file

@ -120,7 +120,7 @@ def test_custom_component_build_template_config():
Test the build_template_config property of the CustomComponent class.
"""
custom_component = CustomComponent(code=code_default, function_entrypoint_name="build")
config = custom_component.build_template_config
config = custom_component.template_config
assert isinstance(config, dict)