mirror of
https://github.com/gogcom/galaxy-integrations-python-api.git
synced 2026-05-18 19:44:39 -04:00
Add achievements_import_complete and game_times_import_complete
This commit is contained in:
@@ -37,6 +37,7 @@ def plugin(reader, writer):
|
||||
"get_owned_games",
|
||||
"prepare_achievements_context",
|
||||
"get_unlocked_achievements",
|
||||
"achievements_import_complete",
|
||||
"get_local_games",
|
||||
"launch_game",
|
||||
"install_game",
|
||||
@@ -44,6 +45,7 @@ def plugin(reader, writer):
|
||||
"get_friends",
|
||||
"get_game_time",
|
||||
"prepare_game_times_context",
|
||||
"game_times_import_complete",
|
||||
"shutdown_platform_client",
|
||||
"shutdown",
|
||||
"tick"
|
||||
|
||||
@@ -40,6 +40,7 @@ async def test_get_unlocked_achievements_success(plugin, read, write):
|
||||
await plugin.run()
|
||||
plugin.prepare_achievements_context.assert_called_with(["14"])
|
||||
plugin.get_unlocked_achievements.assert_called_with("14", 5)
|
||||
plugin.achievements_import_complete.asert_called_with()
|
||||
|
||||
assert get_messages(write) == [
|
||||
{
|
||||
@@ -97,6 +98,7 @@ async def test_get_unlocked_achievements_error(exception, code, message, plugin,
|
||||
plugin.get_unlocked_achievements.side_effect = exception
|
||||
await plugin.run()
|
||||
plugin.get_unlocked_achievements.assert_called()
|
||||
plugin.achievements_import_complete.asert_called_with()
|
||||
|
||||
assert get_messages(write) == [
|
||||
{
|
||||
|
||||
@@ -31,6 +31,7 @@ async def test_get_game_time_success(plugin, read, write):
|
||||
call("5", "abc"),
|
||||
call("7", "abc"),
|
||||
])
|
||||
plugin.game_times_import_complete.assert_called_once_with()
|
||||
|
||||
assert get_messages(write) == [
|
||||
{
|
||||
@@ -96,6 +97,7 @@ async def test_get_game_time_error(exception, code, message, plugin, read, write
|
||||
plugin.get_game_time.side_effect = exception
|
||||
await plugin.run()
|
||||
plugin.get_game_time.assert_called()
|
||||
plugin.game_times_import_complete.assert_called_once_with()
|
||||
|
||||
assert get_messages(write) == [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user