mirror of
https://github.com/rommapp/romm.git
synced 2026-06-28 14:56:01 +00:00
changes from core view
This commit is contained in:
@@ -394,7 +394,7 @@ class TestMobyGamesServiceUnit:
|
||||
@pytest.mark.asyncio
|
||||
async def test_list_games_empty_response(self, service):
|
||||
"""Test list_games with empty response."""
|
||||
mock_response: dict[str, int] = {}
|
||||
mock_response: MockResponse = {}
|
||||
|
||||
with patch.object(service, "_request", return_value=mock_response):
|
||||
result = await service.list_games()
|
||||
|
||||
@@ -523,7 +523,7 @@ class TestScreenScraperServiceUnit:
|
||||
@pytest.mark.asyncio
|
||||
async def test_search_games_no_results(self, service):
|
||||
"""Test search_games when no games are found."""
|
||||
mock_response: dict[str, dict] = {"response": {"jeux": [{}]}}
|
||||
mock_response: dict[str, dict] = {"response": {"jeux": []}}
|
||||
|
||||
with patch.object(service, "_request", return_value=mock_response):
|
||||
result = await service.search_games(term="NonexistentGame")
|
||||
|
||||
@@ -365,7 +365,7 @@ class TestSteamGridDBServiceUnit:
|
||||
@pytest.mark.asyncio
|
||||
async def test_get_grids_for_game_empty_response(self, service):
|
||||
"""Test get_grids_for_game with empty response."""
|
||||
mock_response: dict = {}
|
||||
mock_response: dict[str, list] = {}
|
||||
|
||||
with patch.object(service, "_request", return_value=mock_response):
|
||||
result = await service.get_grids_for_game(123)
|
||||
@@ -499,7 +499,7 @@ class TestSteamGridDBServiceUnit:
|
||||
@pytest.mark.asyncio
|
||||
async def test_search_games_no_results(self, service):
|
||||
"""Test search_games with no results."""
|
||||
mock_response: dict = {"data": []}
|
||||
mock_response: dict[str, list] = {"data": []}
|
||||
|
||||
with patch.object(service, "_request", return_value=mock_response):
|
||||
result = await service.search_games("nonexistent")
|
||||
@@ -509,7 +509,7 @@ class TestSteamGridDBServiceUnit:
|
||||
@pytest.mark.asyncio
|
||||
async def test_search_games_empty_response(self, service):
|
||||
"""Test search_games with empty response."""
|
||||
mock_response: dict = {}
|
||||
mock_response: dict[str, list] = {}
|
||||
|
||||
with patch.object(service, "_request", return_value=mock_response):
|
||||
result = await service.search_games("test")
|
||||
@@ -519,7 +519,7 @@ class TestSteamGridDBServiceUnit:
|
||||
@pytest.mark.asyncio
|
||||
async def test_search_games_special_characters(self, service):
|
||||
"""Test search_games with special characters in term."""
|
||||
mock_response: dict = {"data": []}
|
||||
mock_response: dict[str, list] = {"data": []}
|
||||
|
||||
with patch.object(
|
||||
service, "_request", return_value=mock_response
|
||||
@@ -788,7 +788,7 @@ class TestSteamGridDBServiceEdgeCases:
|
||||
@pytest.mark.asyncio
|
||||
async def test_search_games_empty_term(self, service):
|
||||
"""Test search_games with empty term."""
|
||||
mock_response: dict = {"data": []}
|
||||
mock_response: dict[str, list] = {"data": []}
|
||||
|
||||
with patch.object(
|
||||
service, "_request", return_value=mock_response
|
||||
|
||||
Reference in New Issue
Block a user