def test_check_reservation_room_close(service: UpdateReservationPrices,
                                      context: Context, house, reservation):
    context.house = house
    context.source = attr.evolve(reservation, status=ReservationStatuses.CLOSE)

    result = service.check_reservation(context)
    assert not is_successful(result)
    assert result.failure().failure == ReservationErrors.missed_reservation
def test_check_reservation_wrong_house(service: UpdateReservationPrices,
                                       context: Context, house, reservation):
    context.house = house
    context.source = attr.evolve(reservation, house_id=999)

    result = service.check_reservation(context)
    assert not is_successful(result)
    assert result.failure().failure == ReservationErrors.missed_reservation