Skip to content
This repository was archived by the owner on Sep 3, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tests/incident_cost/test_incident_cost_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def test_calculate_incident_response_cost_with_cost_model(
):
"""Tests that the incident cost is calculated correctly when a cost model is enabled."""
from datetime import timedelta
from decimal import Decimal, ROUND_UP
from decimal import Decimal, ROUND_HALF_UP
from dispatch.incident_cost.service import update_incident_response_cost, get_hourly_rate
from dispatch.incident_cost_type import service as incident_cost_type_service
from dispatch.participant_activity.service import (
Expand Down Expand Up @@ -154,8 +154,8 @@ def test_calculate_incident_response_cost_with_cost_model(
) * hourly_rate + orig_total_incident_cost

assert cost
assert cost == Decimal(expected_incident_cost).quantize(cost, rounding=ROUND_UP)
assert cost == Decimal(incident.total_cost).quantize(cost, rounding=ROUND_UP)
assert cost == Decimal(expected_incident_cost).quantize(cost, rounding=ROUND_HALF_UP)
assert cost == Decimal(incident.total_cost).quantize(cost, rounding=ROUND_HALF_UP)


def test_calculate_incident_response_cost_with_cost_model__no_enabled_plugins(
Expand Down
Loading