From: Karl O. Pinc Date: Fri, 23 Apr 2021 21:38:47 +0000 (-0500) Subject: Inherit from the right exceptions X-Git-Url: https://papio.biology.duke.edu/gitweb/?a=commitdiff_plain;h=175a2c36494cdb4c4790e39899322bf44262a380;p=pgwui_common Inherit from the right exceptions --- diff --git a/src/pgwui_common/exceptions.py b/src/pgwui_common/exceptions.py index 65cf567..593cd7e 100644 --- a/src/pgwui_common/exceptions.py +++ b/src/pgwui_common/exceptions.py @@ -27,13 +27,13 @@ from pgwui_core import exceptions as core_ex from . import constants -class Error(core_ex.PGWUIError): +class Error(core_ex.UploadError): '''Base error class for module ''' pass -class Info(core_ex.PGWUIError): +class Info(core_ex.UploadError): '''Informational exceptions ''' pass diff --git a/tests/test_urls.py b/tests/test_urls.py index 8b9b064..6b6ebfa 100644 --- a/tests/test_urls.py +++ b/tests/test_urls.py @@ -224,7 +224,7 @@ def test_set_menu_url_bad_page( ''' expected_urls = {'home_page': '/', 'pgwui_logout': '/logout'} - mock_url_of_page.side_effect = common_ex.BadPathError + mock_url_of_page.side_effect = common_ex.BadPathError('example error') request = get_current_request new_urls = expected_urls.copy() result = urls.set_menu_url(request, new_urls) @@ -313,7 +313,7 @@ def test_set_urls_bad_path( returned ''' component_errors = ['some error'] - home_error = common_ex.BadPathError() + home_error = common_ex.BadPathError('example bad path error') request = get_current_request() mock_url_of_page.side_effect = home_error