Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ricwo committed Sep 26, 2019
1 parent 2a9d65b commit 876cfab
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion rasa/core/channels/console.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ async def send_message_receive_stream(server_url, auth_token, sender_id, message

async for line in resp.content:
if line:
yield await json.loads(line.decode("utf-8"))
yield json.loads(line.decode("utf-8"))


async def record_messages(
Expand Down
4 changes: 2 additions & 2 deletions rasa/core/lock_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import json
import logging
import os
from typing import Text, Optional, Union
from typing import Text, Optional, Union, AsyncGenerator, Coroutine

from async_generator import asynccontextmanager

Expand Down Expand Up @@ -129,7 +129,7 @@ async def lock(
conversation_id: Text,
lock_lifetime: int = LOCK_LIFETIME,
wait_time_in_seconds: Union[int, float] = 1,
) -> None:
) -> AsyncGenerator[TicketLock, None]:
"""Acquire lock with lifetime `lock_lifetime`for `conversation_id`.
Try acquiring lock with a wait time of `wait_time_in_seconds` seconds
Expand Down
2 changes: 1 addition & 1 deletion tests/core/test_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ async def model_server(test_server, trained_moodbot_path):
server = await test_server(
model_server_app(trained_moodbot_path, model_hash="somehash")
)
yield await server
yield server
await server.close()


Expand Down

0 comments on commit 876cfab

Please sign in to comment.