From c191d893ca424f53d1da02b7187e301a1aade573 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Fri, 23 Jun 2023 10:52:55 -0300 Subject: [PATCH] =?UTF-8?q?=E2=9C=85=20test(test=5Ftemplate.py):=20add=20a?= =?UTF-8?q?ssertions=20to=20test=5Fbuild=5Ftemplate=5Ffrom=5Ffunction=20Ad?= =?UTF-8?q?ded=20assertions=20to=20test=5Fbuild=5Ftemplate=5Ffrom=5Ffuncti?= =?UTF-8?q?on=20to=20ensure=20that=20the=20returned=20result=20is=20not=20?= =?UTF-8?q?None=20and=20that=20the=20expected=20keys=20are=20present=20in?= =?UTF-8?q?=20the=20result.=20This=20improves=20the=20reliability=20of=20t?= =?UTF-8?q?he=20test=20and=20ensures=20that=20the=20function=20is=20workin?= =?UTF-8?q?g=20as=20expected.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/test_template.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_template.py b/tests/test_template.py index 54d869647..66a0b0218 100644 --- a/tests/test_template.py +++ b/tests/test_template.py @@ -59,6 +59,7 @@ def test_build_template_from_function(): # Test with valid name result = build_template_from_function("ExampleClass1", type_to_loader_dict) + assert result is not None assert "template" in result assert "description" in result assert "base_classes" in result @@ -67,6 +68,7 @@ def test_build_template_from_function(): result_with_function = build_template_from_function( "ExampleClass1", type_to_loader_dict, add_function=True ) + assert result_with_function is not None assert "function" in result_with_function["base_classes"] # Test with invalid name