Skip to content

Commit

Permalink
fix/texting_history_answers (#142)
Browse files Browse the repository at this point in the history
* fix/texting_history_answers

* fix lint

---------

Co-authored-by: Andrey Pushnin <[email protected]>
Co-authored-by: Dmitrii Proskurin <[email protected]>
  • Loading branch information
3 people authored Oct 3, 2023
1 parent a1be701 commit dd8517f
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions smart_kit/testing/suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,13 +232,9 @@ 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 +272,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 dd8517f

Please sign in to comment.