fix: Lint fixes of services
All checks were successful
Backend CI / test (push) Successful in 3m59s

This commit is contained in:
JSC
2025-08-01 01:27:47 +02:00
parent 95ccb76233
commit a10111793c
12 changed files with 237 additions and 160 deletions

View File

@@ -168,7 +168,7 @@ class TestCreditService:
mock_socket_manager.send_to_user = AsyncMock()
transaction = await credit_service.deduct_credits(
1, CreditActionType.VLC_PLAY_SOUND, True, {"test": "data"},
1, CreditActionType.VLC_PLAY_SOUND, success=True, metadata={"test": "data"},
)
# Verify user credits were updated
@@ -214,7 +214,7 @@ class TestCreditService:
mock_socket_manager.send_to_user = AsyncMock()
transaction = await credit_service.deduct_credits(
1, CreditActionType.VLC_PLAY_SOUND, False, # Action failed
1, CreditActionType.VLC_PLAY_SOUND, success=False, # Action failed
)
# Verify user credits were NOT updated (action requires success)
@@ -256,7 +256,7 @@ class TestCreditService:
with pytest.raises(InsufficientCreditsError):
await credit_service.deduct_credits(
1, CreditActionType.VLC_PLAY_SOUND, True,
1, CreditActionType.VLC_PLAY_SOUND, success=True,
)
# Verify no socket event was emitted since credits could not be deducted