Skip to content

Commit

Permalink
implement PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Tawakalt committed Feb 5, 2024
1 parent c928e65 commit e9d7183
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion rasa_sdk/cli/arguments.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,5 @@ def add_endpoint_arguments(parser):
parser.add_argument(
"--endpoints",
default=DEFAULT_ENDPOINTS_PATH,
help="Configuration file for tracing as a yml file.",
help="Configuration file for the assistant as a yml file.",
)
17 changes: 13 additions & 4 deletions tests/test_arguments.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
import rasa_sdk.endpoint as ep
import pytest

from rasa_sdk.constants import DEFAULT_ENDPOINTS_PATH

def test_arg_parser_endpoints():

@pytest.mark.parametrize(
"args, expected",
[
([], DEFAULT_ENDPOINTS_PATH),
(["--endpoints", "a.yml"], "a.yml"),
],
)
def test_arg_parser_endpoints(args, expected):
parser = ep.create_argument_parser()
args = ["--endpoints", "endpoint.yml"]
cmdline_args = parser.parse_args(args)
assert cmdline_args.endpoints == "endpoint.yml"
assert cmdline_args.endpoints == expected

help_text = parser.format_help()
assert "--endpoints ENDPOINTS" in help_text
assert " Configuration file for tracing as a yml file." in help_text
assert " Configuration file for the assistant as a yml file." in help_text

0 comments on commit e9d7183

Please sign in to comment.