Extend shift reporting and downtime analytics
This commit is contained in:
1 parent
41a5ae7a63
commit
6e8eb6f50f
74 files changed
+5397
-238
No files matched your search
@@ -216,6 +216,20 @@ def test_service_reads_once_and_preserves_boundary_timezones():
|
||||
assert summary.items[0].first_confirmation_at.tzinfo is BERLIN
|
||||
|
||||
|
||||
def test_service_passes_explicit_site_timezone_to_gateway():
|
||||
malaysia = ZoneInfo("Asia/Kuala_Lumpur")
|
||||
gateway = Mock()
|
||||
gateway.get_confirmations.return_value = []
|
||||
start = datetime(2026, 10, 19, 6, tzinfo=malaysia)
|
||||
end = datetime(2026, 10, 19, 14, tzinfo=malaysia)
|
||||
ShiftProductionService(gateway).summarize(
|
||||
workplace="Malaysia", start=start, end=end, timezone=malaysia,
|
||||
)
|
||||
gateway.get_confirmations.assert_called_once_with(
|
||||
workplace="Malaysia", start=start, end=end, timezone=malaysia,
|
||||
)
|
||||
|
||||
|
||||
def test_gateway_errors_propagate():
|
||||
gateway = Mock()
|
||||
gateway.get_confirmations.side_effect = ErpReadError("ERP production confirmation read failed")
|
||||
|
||||
Reference in new issue
Block a user