def check_costs_for_not_found(failed_perdiem_query,
                              sample_costs,
                              sample_failed_calculated_costs,
                              sample_trip_leg):
    costs = calculated_trip_costs(
        trip_costs_by_perdiems([sample_trip_leg],
                               [failed_perdiem_query]))
    assert sample_failed_calculated_costs == costs
def check_adjusted_costs(sample_costs,
                         sample_adjusted_costs,
                         sample_trip_leg,
                         sample_perdiem_query):
    adjusted = calculated_trip_costs(
        trip_costs_by_perdiems([sample_trip_leg],
                               [sample_perdiem_query]))
    assert adjusted == sample_adjusted_costs