Commit 5812b6b
π§ͺ [testing improvement] Add error test for parse_command_arguments
This change adds comprehensive unit tests for the `parse_command_arguments` function in `src/enapter/cli/http/api/command_arguments.py`.
π― **What:** The testing gap addressed was the lack of validation for the JSON decoding error path.
π **Coverage:** The new tests cover:
- Passing `None` (returns empty dict)
- Passing valid JSON (returns parsed dict)
- Passing invalid JSON (raises `argparse.ArgumentTypeError`)
β¨ **Result:** Improved reliability and code coverage for CLI argument parsing.
Co-authored-by: rnovatorov <20299819+rnovatorov@users.noreply.github.com>1 parent 58fcb37 commit 5812b6b
4 files changed
Lines changed: 14 additions & 0 deletions
File tree
- tests/unit/test_cli
- test_http
- test_api
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
0 commit comments