Add unit tests for TemplateLoader.parse(), format(), and load()
TemplateLoader in nettacker/core/template.py has several code paths in
parse(), format(), and load() that are not directly covered by the
current unit tests.
I’d like to add unit tests for the existing behavior of these methods.
What needs to be tested
-
TemplateLoader.parse()- recursive dictionary parsing
- recursive list parsing
- input substitutions
- current timeout handling
-
TemplateLoader.format()- opening a template
- formatting template content with supplied inputs
-
TemplateLoader.load()- formatting and loading YAML
- passing the loaded data through
parse()
Tests can be added under tests/unit/.
No production code changes or refactoring are intended as part of this issue.
If this looks good, I can work on the tests and submit a PR.
Hi! I'd like to take this on. I'll add unit tests for TemplateLoader.parse(), format(), and load() under tests/unit/ covering the paths you listed — recursive dict/list parsing, substitutions, timeout handling, and YAML loading. No production code changes. Could you assign me? Thanks!
Hello @maintainers,
I noticed this issue is still unassigned. I have a test plan prepared to add unit test coverage for parse(), format(), and load() in tests/unit/core/test_template.py, covering recursive parsing, timeout overrides, and the full YAML loading pipeline without modifying production code.
If this is still available, could you please assign this issue to me?
Hi! I'd like to take this on. I'll add unit tests for TemplateLoader.parse(), format(), and load() under tests/unit/ covering the paths listed — no production code changes. Could you assign me? Thanks!
Hi! I'm working on this now — I'll add unit tests for TemplateLoader.parse(), format() and load() under tests/unit/, covering the paths listed. No production code changes. PR coming within a day or two.
Hi! I opened PR #1781 for this, but the contribution validator auto-closed it because the issue needs to be assigned to the PR author before merge. Could a maintainer assign me this issue? I'll reopen the PR immediately after. Thanks!
Friendly ping 🙏 — my PR #1781 is ready (tests pass locally, DCO sign-off added) and just needs this issue assigned to me so the contribution validator lets it through. Could a maintainer take a look when convenient? Happy to adjust anything. Thanks!