mirror of
https://github.com/rommapp/romm.git
synced 2026-11-29 01:58:41 +01:00
fix: narrow await_args before attribute access in moby handler tests
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -64,7 +64,9 @@ class TestSearchTermEncoding:
|
||||
await handler._search_rom("Sonic & Knuckles", platform_moby_id=16)
|
||||
|
||||
mock_list_games.assert_awaited_once()
|
||||
title = mock_list_games.await_args.kwargs["title"]
|
||||
await_args = mock_list_games.await_args
|
||||
assert await_args is not None
|
||||
title = await_args.kwargs["title"]
|
||||
assert title == "Sonic & Knuckles"
|
||||
assert "%" not in title
|
||||
|
||||
@@ -90,6 +92,8 @@ class TestSearchTermEncoding:
|
||||
)
|
||||
|
||||
mock_list_games.assert_awaited_once()
|
||||
title = mock_list_games.await_args.kwargs["title"]
|
||||
await_args = mock_list_games.await_args
|
||||
assert await_args is not None
|
||||
title = await_args.kwargs["title"]
|
||||
assert title == "Super Mario 3D World + Bowser's Fury"
|
||||
assert "%" not in title
|
||||
|
||||
Reference in New Issue
Block a user