mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-27 11:41:32 +00:00
[Feature] - CLI integration tests (#6533)
* Integration test batch 1 * Mark test * Update cli/integration/test_integration_obbject_registry.py Co-authored-by: Henrique Joaquim <henriquecjoaquim@gmail.com> * example of command tests * Add more test cases --------- Co-authored-by: Henrique Joaquim <henriquecjoaquim@gmail.com> Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com>
This commit is contained in:
26
cli/integration/test_integration_cli_controller.py
Normal file
26
cli/integration/test_integration_cli_controller.py
Normal file
@@ -0,0 +1,26 @@
|
||||
"""Test the CLI controller integration."""
|
||||
|
||||
from openbb_cli.controllers.cli_controller import (
|
||||
CLIController,
|
||||
)
|
||||
|
||||
|
||||
def test_parse_input_valid_commands():
|
||||
"""Test parse_input method."""
|
||||
controller = CLIController()
|
||||
input_string = "exe --file test.openbb"
|
||||
expected_output = [
|
||||
"exe --file test.openbb"
|
||||
] # Adjust based on actual expected behavior
|
||||
assert controller.parse_input(input_string) == expected_output
|
||||
|
||||
|
||||
def test_parse_input_invalid_commands():
|
||||
"""Test parse_input method."""
|
||||
controller = CLIController()
|
||||
input_string = "nonexistentcommand args"
|
||||
expected_output = ["nonexistentcommand args"]
|
||||
actual_output = controller.parse_input(input_string)
|
||||
assert (
|
||||
actual_output == expected_output
|
||||
), f"Expected {expected_output}, got {actual_output}"
|
||||
Reference in New Issue
Block a user