Skip to content

Commit

Permalink
Ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
tofarr committed Dec 31, 2024
1 parent 0e03376 commit d3d1b28
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions tests/unit/test_conversation.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ def _patch_store():
@pytest.mark.asyncio
async def test_search_conversations():
with _patch_store():
result_set = await search_conversations(MagicMock(state=MagicMock(github_token='')))
result_set = await search_conversations(
MagicMock(state=MagicMock(github_token=''))
)
expected = ConversationInfoResultSet(
results=[
ConversationInfo(
Expand All @@ -67,7 +69,9 @@ async def test_search_conversations():
@pytest.mark.asyncio
async def test_get_conversation():
with _patch_store():
conversation = await get_conversation('some_conversation_id', MagicMock(state=MagicMock(github_token='')))
conversation = await get_conversation(
'some_conversation_id', MagicMock(state=MagicMock(github_token=''))
)
expected = ConversationInfo(
id='some_conversation_id',
title='Some Conversation',
Expand All @@ -84,4 +88,9 @@ async def test_get_missing_conversation():
'openhands.server.routes.new_conversation.session_manager.file_store',
InMemoryFileStore({}),
):
assert await get_conversation('no_such_conversation', MagicMock(state=MagicMock(github_token=''))) is None
assert (
await get_conversation(
'no_such_conversation', MagicMock(state=MagicMock(github_token=''))
)
is None
)

0 comments on commit d3d1b28

Please sign in to comment.