chore: add calc timing logs
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import logging
|
||||
|
||||
from api.core.Auth import AlterState
|
||||
from services.calc_service import calculate
|
||||
|
||||
@@ -9,3 +11,12 @@ def test_calculate_returns_character_calc_result(minimal_calc_config):
|
||||
|
||||
assert isinstance(result, dict)
|
||||
assert set(['uuid', 'skills', 'info', 'suits', 'buffer']).issubset(result)
|
||||
|
||||
|
||||
def test_calculate_logs_timing(caplog, minimal_calc_config):
|
||||
state = AlterState('GF.swordman_male.weapon_master', 'token', {}, '0', 0)
|
||||
|
||||
with caplog.at_level(logging.INFO, logger='dcalc.calc'):
|
||||
calculate(state, minimal_calc_config)
|
||||
|
||||
assert any('calc completed alter=GF.swordman_male.weapon_master' in record.message for record in caplog.records)
|
||||
|
||||
Reference in New Issue
Block a user