Skip to content

Commit 321876a

Browse files
committed
add test for conversation id generation
1 parent 7b51629 commit 321876a

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

rasa/core/training/interactive.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1317,7 +1317,7 @@ async def _plot_trackers(
13171317
output_file: Optional[Text],
13181318
endpoint: EndpointConfig,
13191319
unconfirmed: Optional[List[Event]] = None,
1320-
):
1320+
) -> None:
13211321
"""Create a plot of the trackers of the passed conversation ids.
13221322
13231323
This assumes that the last conversation id is the conversation we are currently
@@ -1328,7 +1328,7 @@ async def _plot_trackers(
13281328
if not output_file or not conversation_ids:
13291329
# if there is no output file provided, we are going to skip plotting
13301330
# same happens if there are no conversation ids
1331-
return None
1331+
return
13321332

13331333
event_sequences = await _fetch_events(conversation_ids, endpoint)
13341334

tests/cli/test_rasa_interactive.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,3 +177,13 @@ def test_pass_conversation_id_to_interactive_learning(monkeypatch: MonkeyPatch):
177177
do_interactive_learning(args, Mock())
178178

179179
_serve_application.assert_called_once_with(ANY, ANY, True, expected_conversation_id)
180+
181+
182+
def test_generate_conversation_id_for_interactive_learning(monkeypatch: MonkeyPatch):
183+
parser = argparse.ArgumentParser()
184+
sub_parser = parser.add_subparsers()
185+
interactive.add_subparser(sub_parser, [])
186+
187+
args = parser.parse_args(["interactive"])
188+
189+
assert args.conversation_id

0 commit comments

Comments
 (0)