"""Test error_handling methods.""" import pytest from ledger_accounting_run_balance import error_handling def test_raise_service_error(): """Test raise_service_error logs error and raises exception.""" error_msg = 'ERROR to GET /object/object_id' service = 'ows-service' with pytest.raises(error_handling.OwsServiceException) as e: error_handling.raise_service_error(error_msg, service) assert f'{service} failure: {error_msg}' in str(e.value)