Skip to content

Commit

Permalink
Merge branch 'master' into 77_multiple_commands_from_a_single_message
Browse files Browse the repository at this point in the history
  • Loading branch information
MattPrit committed Sep 7, 2022
2 parents 125c6f4 + f4b3625 commit a0384bc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
from typing import AnyStr, AsyncIterable, List

import pytest
from mock import AsyncMock

from tickit.adapters.interpreters.wrappers import JoiningInterpreter


@pytest.mark.asyncio
async def test_joining_interpreterconcatenates_as_expected():
async def multi_resp(msgs):
async def test_joining_interpreter_concatenates_as_expected():
async def multi_resp(msgs: List[AnyStr]) -> AsyncIterable[AnyStr]:
for msg in msgs:
yield msg

Expand Down
3 changes: 1 addition & 2 deletions tickit/adapters/interpreters/wrappers/joining_interpreter.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ async def _combine_responses(
"""
response_list = [response async for response in responses]
response = self.response_delimiter.join(response_list)
resp = wrap_as_async_iterable(response)
return resp
return wrap_as_async_iterable(response)

async def handle(
self, adapter: Adapter, message: AnyStr
Expand Down

0 comments on commit a0384bc

Please sign in to comment.