"""Tests for custom exception class.""" import pytest from file_upload_initialize.exception import OwsServiceException class TestOwsServiceException: """Tests for OwsServiceException.""" def test_exception_creation(self): """Test OwsServiceException can be created and raised.""" error_message = 'Test error message' with pytest.raises(OwsServiceException) as exc_info: raise OwsServiceException(error_message) assert str(exc_info.value) == error_message def test_exception_inheritance(self): """Test OwsServiceException inherits from Exception.""" assert issubclass(OwsServiceException, Exception)