-
Notifications
You must be signed in to change notification settings - Fork 226
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1072 from RasaHQ/ATO-1661-add-endpoints-arg-to-ra…
…sa-sdk-cli [ATO-1661] Add `--endpoints` flag to rasa-sdk cli
- Loading branch information
Showing
4 changed files
with
29 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Add an `--endpoint` flag to the rasa_sdk CLI to enable tracing configuration. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import rasa_sdk.endpoint as ep | ||
import pytest | ||
|
||
from rasa_sdk.constants import DEFAULT_ENDPOINTS_PATH | ||
|
||
|
||
@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() | ||
cmdline_args = parser.parse_args(args) | ||
assert cmdline_args.endpoints == expected | ||
|
||
help_text = parser.format_help() | ||
assert "--endpoints ENDPOINTS" in help_text | ||
assert " Configuration file for the assistant as a yml file." in help_text |