Skip to content

Copy tests/test.json from the function template instead of generating it - #172

Merged
ritaagarwala-sf merged 2 commits into
developfrom
test_file_from_template_develop
Nov 12, 2026
Merged

ritaagarwala-sf merged 2 commits into
developfrom
test_file_from_template_develop

Conversation

@ritaagarwala-sf

Copy link
Copy Markdown
Collaborator

Summary

  • datacustomcode init --code-type function now copies payload/tests/test.json from the template instead of generating a new one.
  • Adds the sample request at templates/function/chunking/payload/tests/test.json.
  • _generate_function_test_file() is kept as a fallback, used only when the template doesn't ship a tests/test.json.

Test plan

  • pytest tests/test_cli.py tests/test_deploy.py tests/test_describe_supported_signatures.py tests/test_function_utils.py tests/test_template.py
  • mypy src/datacustomcode/cli.py
  • datacustomcode init <dir> --code-type function copies a tests/test.json identical to the template's
  • Remove the template's tests/test.json and confirm init falls back to generating one

🤖 Generated with Claude Code

@ritaagarwala-sf
ritaagarwala-sf merged commit 2aa4bcd into develop Nov 12, 2026
6 checks passed
ritaagarwala-sf added a commit that referenced this pull request Nov 12, 2026
…from develop #171, #172) (#173)

* Dynamic error message for function signature mismatch  (#171)

* Dynamic error message instead of static for function signature mistmatch

* Fixing lint error

* Copy tests/test.json from the function template instead of generating it (#172)

* Copying tests/test.json from templates instead of generating a new one

* Lint error fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants