Skip to content

Commit

Permalink
Fix TestChat to process events one by one.
Browse files Browse the repository at this point in the history
  • Loading branch information
sklinglernv committed Oct 22, 2024
1 parent f9e8459 commit 81b6ed6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,13 +182,13 @@ def bot(self, msg: str):
elif self.config.colang_version == "2.x":
output_msgs = []
while self.input_events:
event = self.input_events.pop(0)
output_events, output_state = self.app.process_events(
self.input_events, self.state
[event], self.state
)

# We detect any "StartUtteranceBotAction" events, show the message, and
# generate the corresponding Finished events as new input events.
self.input_events = []
for event in output_events:
if event["type"] == "StartUtteranceBotAction":
output_msgs.append(event["script"])
Expand Down

0 comments on commit 81b6ed6

Please sign in to comment.