Skip to content

Commit

Permalink
fix/texting_history_answers
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrey Pushnin committed Sep 28, 2023
1 parent 616b955 commit 23aab1a
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions smart_kit/testing/suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,13 +232,11 @@ async def _run(self) -> bool:

self.post_setup_user(user)

commands = []
answers = []
async for command in self.app_model.answer(message, user):
commands.append(command)
answers.extend(self._generate_answers(
user=user, commands=[command], message=message
))
commands = [command async for command in self.app_model.answer(message, user)]
answers = self._generate_answers(
user=user, commands=commands, message=message
)
answers.extend(self._generate_history_answers(user, message))

predefined_fields_resp = response.get("predefined_fields")
if predefined_fields_resp:
Expand Down Expand Up @@ -276,6 +274,9 @@ def _generate_answers(self, user, commands, message):
answers.append(answer)
return answers

def _generate_history_answers(self, user, message):
return []

def create_message(self, data, headers=None):
defaults = Environment().as_dict

Expand Down

0 comments on commit 23aab1a

Please sign in to comment.